public interface ToggleButtonModel extends ButtonModel
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(ChangeListener l)
Adds a
ChangeListener to receive notification of state
changes, i.e., to the selected state of a ToggleButton. |
boolean |
isSelected()
Returns the selection state.
|
void |
removeChangeListener(ChangeListener l)
Removes a
ChangeListener from being notified of state
changes, i.e., to the selected state of a ToggleButton. |
void |
setSelected(boolean newValue)
Sets the selection state.
|
addActionListener, doAction, getActionCommand, removeActionListener, setActionCommandvoid addChangeListener(ChangeListener l)
ChangeListener to receive notification of state
changes, i.e., to the selected state of a ToggleButton.l - the listener to addboolean isSelected()
void removeChangeListener(ChangeListener l)
ChangeListener from being notified of state
changes, i.e., to the selected state of a ToggleButton.l - the listener to removevoid setSelected(boolean newValue)
newValue - the new selection state