|
|||||||||
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)
ButtonModel
ActionListener
to the button.
addActionListener
in interface ButtonModel
l
- The ActionListener
to be added.ButtonModel.addActionListener(ActionListener)
public void addChangeListener(ChangeListener l)
ButtonModel
ChangeListener
to the button.
addChangeListener
in interface ButtonModel
l
- The ChangeListener
to be added.ButtonModel.addChangeListener(ChangeListener)
public void addItemListener(ItemListener l)
ButtonModel
ItemListener
to the button.
addItemListener
in interface ButtonModel
l
- The ItemListener
to be added.ButtonModel.addItemListener(ItemListener)
public void doAction()
doAction
in interface ButtonModel
public 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 ButtonModel
ButtonModel.getActionCommand()
public ButtonGroup getGroup()
ButtonGroup
to which this button belongs, if
any.
getGroup
in interface ButtonModel
public boolean isSelected()
ButtonModel
isSelected
in interface ButtonModel
ButtonModel.isSelected()
public void removeActionListener(ActionListener l)
ButtonModel
ActionListener
from the button.
removeActionListener
in interface ButtonModel
l
- The ActionListener
to be removed.ButtonModel.removeActionListener(ActionListener)
public void removeChangeListener(ChangeListener l)
ButtonModel
ChangeListener
from the button.
removeChangeListener
in interface ButtonModel
l
- The ChangeListener
to be removed.ButtonModel.removeChangeListener(ChangeListener)
public void removeItemListener(ItemListener l)
ButtonModel
ItemListener
from the button.
removeItemListener
in interface ButtonModel
l
- The ItemListener
to be removed.ButtonModel.removeItemListener(ItemListener)
public void setActionCommand(java.lang.String actionCommand)
ButtonModel
setActionCommand
in interface ButtonModel
actionCommand
- The new action command for this button.ButtonModel.setActionCommand(String)
public void setSelected(boolean selected)
ButtonModel
setSelected
in interface ButtonModel
selected
- The new selection state of the button.ButtonModel.setSelected(boolean)
public void setGroup(ButtonGroup group)
ButtonModel
setGroup
in interface ButtonModel
group
- The button's new group.ButtonModel.setGroup(ButtonGroup)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |