Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.java.swing.DefaultButtonModel
Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.
Field Summary | |
java.lang.String | actionCommand
|
static int | ARMED
Indicates if the button can be selected or not by an input device (such as a mouse pointer). |
ChangeEvent | changeEvent
Only one ChangeEvent is needed per button model instance since the event's only state is the source property. |
static int | ENABLED
Indicates whether the button is currently enabled. |
ButtonGroup | group
|
EventListenerList | listenerList
|
int | mnemonic
|
static int | PRESSED
Indicates partial commitment towards choosing the button. |
static int | ROLLOVER
Indicates that the mouse is over the button. |
static int | SELECTED
Indicates if the button has been selected. |
int | stateMask
|
Constructor Summary | |
DefaultButtonModel()
Constructs a JButtonModel |
Method Summary | |
void | addActionListener(java.awt.event.ActionListener l)
adds an ActionListener to the button |
void | addChangeListener(ChangeListener l)
Adds a ChangeListener to the button. |
void | addItemListener(java.awt.event.ItemListener l)
adds an ItemListener to the button |
void | fireActionPerformed(java.awt.event.ActionEvent e)
|
void | fireItemStateChanged(java.awt.event.ItemEvent e)
|
void | fireStateChanged()
|
java.lang.String | getActionCommand()
Returns the action command for this button. |
int | getMnemonic()
Gets the keyboard mnemonic for this model |
java.lang.Object[] | getSelectedObjects()
|
boolean | isArmed()
Returns whether the button is "armed". |
boolean | isEnabled()
Checks if the button is disabled. |
boolean | isPressed()
Checks if the button is pressed. |
boolean | isRollover()
Checks if the button is rolled over. |
boolean | isSelected()
Checks if the button is selected. |
void | removeActionListener(java.awt.event.ActionListener l)
removes an ActionListener from the button |
void | removeChangeListener(ChangeListener l)
Removes a ChangeListener from the button. |
void | removeItemListener(java.awt.event.ItemListener l)
removes an ItemListener from the button |
void | setActionCommand(java.lang.String actionCommand)
Sets the actionCommand that gets sent when the putton is pressed. |
void | setArmed(boolean b)
Identifies the button as "armed". |
void | setEnabled(boolean b)
Sets the button to be enabled or disabled state |
void | setGroup(ButtonGroup group)
|
void | setMnemonic(int key)
Sets the keyboard mnemonic for this model |
void | setPressed(boolean b)
Sets the button to pressed state |
void | setRollover(boolean b)
Sets the button to the rollover state |
void | setSelected(boolean b)
Sets the selected state of the button. |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Field Detail |
protected int stateMask
protected java.lang.String actionCommand
protected ButtonGroup group
protected int mnemonic
protected transient ChangeEvent changeEvent
protected EventListenerList listenerList
public static final int ARMED
public static final int SELECTED
public static final int PRESSED
public static final int ENABLED
public static final int ROLLOVER
Constructor Detail |
public DefaultButtonModel()
Method Detail |
public void setActionCommand(java.lang.String actionCommand)
public java.lang.String getActionCommand()
public boolean isArmed()
public boolean isSelected()
public boolean isEnabled()
public boolean isPressed()
public boolean isRollover()
public void setArmed(boolean b)
b
- true to arm the button so it can be selectedpublic void setEnabled(boolean b)
public void setSelected(boolean b)
b
- true selects the toggle button,
false deselects the toggle button.public void setPressed(boolean b)
public void setRollover(boolean b)
public void setMnemonic(int key)
public int getMnemonic()
public void addChangeListener(ChangeListener l)
public void removeChangeListener(ChangeListener l)
protected void fireStateChanged()
public void addActionListener(java.awt.event.ActionListener l)
public void removeActionListener(java.awt.event.ActionListener l)
protected void fireActionPerformed(java.awt.event.ActionEvent e)
public void addItemListener(java.awt.event.ItemListener l)
public void removeItemListener(java.awt.event.ItemListener l)
protected void fireItemStateChanged(java.awt.event.ItemEvent e)
public java.lang.Object[] getSelectedObjects()
public void setGroup(ButtonGroup group)
Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |