NextApp Echo
1.0.5

nextapp.echo
Interface ButtonModel

All Known Implementing Classes:
DefaultButtonModel

public interface ButtonModel

State model for buttons.

This class provides an optional void doAction() method which may be overridden to notify ActionListeners that a user action has occurred. To make use of this feature, the implementing class must be publicly accessible, and the method must be public.


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.
 java.lang.String getActionCommand()
          Returns the action command for this button.
 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

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

Parameters:
l - The ActionListener to be added.

addChangeListener

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

Parameters:
l - The ChangeListener to be added.

addItemListener

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

Parameters:
l - The ItemListener to be added.

getActionCommand

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

Returns:
The action command for this button.

isSelected

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

Returns:
The button's selection state.

removeActionListener

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

Parameters:
l - The ActionListener to be removed.

removeChangeListener

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

Parameters:
l - The ChangeListener to be removed.

removeItemListener

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

Parameters:
l - The ItemListener to be removed.

setActionCommand

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

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

setGroup

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

Parameters:
newValue - The button's new group.

setSelected

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

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

NextApp Echo
1.0.5