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 |
|
|
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) |
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 |
/** |
/** |