|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo.DefaultButtonModel
public class DefaultButtonModel
The default implementation of a button's data model.
| Field Summary | |
|---|---|
protected EventListenerList |
listenerList
|
| Constructor Summary | |
|---|---|
DefaultButtonModel()
Creates a new default button model. |
|
| Method Summary | |
|---|---|
void |
addActionListener(ActionListener l)
Adds an ActionListener to the button. |
void |
addChangeListener(ChangeListener l)
Adds a ChangeListener to the button. |
void |
addItemListener(ItemListener l)
Adds a ItemListener to the button. |
void |
doAction()
Processes a user action. |
void |
fireActionPerformed(ActionEvent e)
Notifies all listeners that have registered for this event type. |
void |
fireItemStateChanged(ItemEvent e)
Notifies all listeners that have registered for this event type. |
void |
fireStateChanged()
Notifies all listeners that have registered for this event type. |
java.lang.String |
getActionCommand()
Returns the action command for this button. |
ButtonGroup |
getGroup()
Returns the ButtonGroup to which this button belongs, if
any. |
boolean |
isSelected()
Returns the button's selection state. |
void |
removeActionListener(ActionListener l)
Removes an ActionListener from the button. |
void |
removeChangeListener(ChangeListener l)
Removes a ChangeListener from the button. |
void |
removeItemListener(ItemListener l)
Removes a ItemListener from the button. |
void |
setActionCommand(java.lang.String actionCommand)
Sets the button's action command. |
void |
setGroup(ButtonGroup group)
Sets the button's group. |
void |
setSelected(boolean selected)
Sets the button's selection state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected EventListenerList listenerList
| Constructor Detail |
|---|
public DefaultButtonModel()
| Method Detail |
|---|
public void addActionListener(ActionListener l)
ButtonModelActionListener to the button.
addActionListener in interface ButtonModell - The ActionListener to be added.ButtonModel.addActionListener(ActionListener)public void addChangeListener(ChangeListener l)
ButtonModelChangeListener to the button.
addChangeListener in interface ButtonModell - The ChangeListener to be added.ButtonModel.addChangeListener(ChangeListener)public void addItemListener(ItemListener l)
ButtonModelItemListener to the button.
addItemListener in interface ButtonModell - The ItemListener to be added.ButtonModel.addItemListener(ItemListener)public void doAction()
doAction in interface ButtonModelpublic void fireActionPerformed(ActionEvent e)
e - The ActionEvent to send.public void fireItemStateChanged(ItemEvent e)
e - The ItemEvent to send.public void fireStateChanged()
public java.lang.String getActionCommand()
ButtonModel
getActionCommand in interface ButtonModelButtonModel.getActionCommand()public ButtonGroup getGroup()
ButtonGroup to which this button belongs, if
any.
getGroup in interface ButtonModelpublic boolean isSelected()
ButtonModel
isSelected in interface ButtonModelButtonModel.isSelected()public void removeActionListener(ActionListener l)
ButtonModelActionListener from the button.
removeActionListener in interface ButtonModell - The ActionListener to be removed.ButtonModel.removeActionListener(ActionListener)public void removeChangeListener(ChangeListener l)
ButtonModelChangeListener from the button.
removeChangeListener in interface ButtonModell - The ChangeListener to be removed.ButtonModel.removeChangeListener(ChangeListener)public void removeItemListener(ItemListener l)
ButtonModelItemListener from the button.
removeItemListener in interface ButtonModell - The ItemListener to be removed.ButtonModel.removeItemListener(ItemListener)public void setActionCommand(java.lang.String actionCommand)
ButtonModel
setActionCommand in interface ButtonModelactionCommand - The new action command for this button.ButtonModel.setActionCommand(String)public void setSelected(boolean selected)
ButtonModel
setSelected in interface ButtonModelselected - The new selection state of the button.ButtonModel.setSelected(boolean)public void setGroup(ButtonGroup group)
ButtonModel
setGroup in interface ButtonModelgroup - The button's new group.ButtonModel.setGroup(ButtonGroup)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||