/[classpath]/classpath/javax/swing/JTextField.java
ViewVC logotype

Diff of /classpath/javax/swing/JTextField.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by mkoch, Thu Jan 20 10:18:00 2005 UTC revision 1.17 by mkoch, Wed Jan 26 14:26:20 2005 UTC
# Line 1  Line 1 
1  /* JTextField.java --  /* JTextField.java --
2     Copyright (C) 2002, 2004  Free Software Foundation, Inc.     Copyright (C) 2002, 2004, 2005  Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 322  public class JTextField extends JTextCom Line 322  public class JTextField extends JTextCom
322    
323    public void postActionEvent()    public void postActionEvent()
324    {    {
325      ActionEvent event = new ActionEvent(this, 0, actionCommand);      String command = actionCommand != null ? actionCommand : getText();
326        ActionEvent event = new ActionEvent(this, 0, command);
327      ActionListener[] listeners = getActionListeners();      ActionListener[] listeners = getActionListeners();
328    
329      for (int index = 0; index < listeners.length; ++index)      for (int index = 0; index < listeners.length; ++index)
# Line 369  public class JTextField extends JTextCom Line 370  public class JTextField extends JTextCom
370    /**    /**
371     * @since 1.3     * @since 1.3
372     */     */
   public String getActionCommand()  
   {  
     return actionCommand;  
   }  
   
   /**  
    * @since 1.3  
    */  
373    public void setActionCommand(String command)    public void setActionCommand(String command)
374    {    {
375      this.actionCommand = command;      actionCommand = command;
376    }    }
377    
378    /**    /**

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26