nextapp.echo
Interface ButtonModel

All Known Implementing Classes:
DefaultButtonModel, DefaultMenuItemModel, ToggleButton.ToggleButtonModel

public interface ButtonModel

State model for buttons.


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()
          Notifies the model of the button's action having been invoked.
 java.lang.String getActionCommand()
          Returns the action command for this button.
 ButtonGroup getGroup()
           
 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 newValue)
          Sets the button's group.
 void setSelected(boolean selected)
          Sets the button's selection state.
 

Method Detail

addActionListener

void addActionListener(ActionListener l)
Adds an ActionListener to the button.

Parameters:
l - The ActionListener to be added.

addChangeListener

void addChangeListener(ChangeListener l)
Adds a ChangeListener to the button.

Parameters:
l - The ChangeListener to be added.

addItemListener

void addItemListener(ItemListener l)
Adds a ItemListener to the button.

Parameters:
l - The ItemListener to be added.

doAction

void doAction()
Notifies the model of the button's action having been invoked.


getActionCommand

java.lang.String getActionCommand()
Returns the action command for this button.

Returns:
The action command for this button.

isSelected

boolean isSelected()
Returns the button's selection state.

Returns:
The button's selection state.

removeActionListener

void removeActionListener(ActionListener l)
Removes an ActionListener from the button.

Parameters:
l - The ActionListener to be removed.

removeChangeListener

void removeChangeListener(ChangeListener l)
Removes a ChangeListener from the button.

Parameters:
l - The ChangeListener to be removed.

removeItemListener

void removeItemListener(ItemListener l)
Removes a ItemListener from the button.

Parameters:
l - The ItemListener to be removed.

setActionCommand

void setActionCommand(java.lang.String actionCommand)
Sets the button's action command.

Parameters:
actionCommand - The new action command for this button.

setGroup

void setGroup(ButtonGroup newValue)
Sets the button's group. (Needed for radio buttons)

Parameters:
newValue - The button's new group.

getGroup

ButtonGroup getGroup()

setSelected

void setSelected(boolean selected)
Sets the button's selection state.

Parameters:
selected - The new selection state of the button.