API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing. ButtonModel View Source
Author(s)
Jeff Dinkins
Since
Version
1.29 02/14/06
Serial
Hierarchy
 ItemSelectable
      ButtonModel
Subinterfaces
Description
public interface ButtonModel
  State model for buttons.
See also:   
Methods
Hide/Show inherited methods
public void addActionListener (ActionListener l)
  Adds an ActionListener to the model.
public void addChangeListener (ChangeListener l)
  Adds a ChangeListener to the model.
public void addItemListener (ItemListener l) [Specified in ItemSelectable]
  Adds an ItemListener to the model.
public String getActionCommand ()
  Returns the action command string for the button.
public int getMnemonic ()
  Gets the keyboard mnemonic for the button.
public boolean isArmed ()
  Indicates partial commitment towards triggering the button.
public boolean isEnabled ()
  Indicates if the button can be selected or triggered by an input device, such as a mouse pointer.
public boolean isPressed ()
  Indicates if the button is pressed.
public boolean isRollover ()
  Indicates that the mouse is over the button.
public boolean isSelected ()
  Indicates if the button has been selected.
public void removeActionListener (ActionListener l)
  Removes an ActionListener from the model.
public void removeChangeListener (ChangeListener l)
  Removes a ChangeListener from the model.
public void removeItemListener (ItemListener l) [Specified in ItemSelectable]
  Removes an ItemListener from the model.
public void setActionCommand (String s)
  Sets the action command string that gets sent as part of the ActionEvent when the button is triggered.
public void setArmed (boolean b)
  Marks the button as armed or unarmed.
public void setEnabled (boolean b)
  Enables or disables the button.
public void setGroup (ButtonGroup group)
  Identifies the group the button belongs to -- needed for radio buttons, which are mutually exclusive within their group.
public void setMnemonic (int key)
  Sets the keyboard mnemonic (shortcut key or accelerator key) for the button.
public void setPressed (boolean b)
  Sets the button to pressed or unpressed.
public void setRollover (boolean b)
  Sets or clears the button's rollover state
public void setSelected (boolean b)
  Selects or deselects the button.
Fields
Hide/Show inherited fields
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar