|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
com.jgoodies.uif.action.ToggleAction
public final class ToggleAction
An Action implementation useful to to create JCheckBoxes, JRadioButtons, JCheckBoxMenuItems and other toggle components. ToggleActions do not perform an action. They provide a toggle state in the ButtonModel and the data required to build toggle components: icon, text, mnemonic, etc.
ButtonModel
,
Serialized FormField Summary |
---|
Fields inherited from class javax.swing.AbstractAction |
---|
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent evt)
Does nothing. |
ButtonModel |
createButtonModel()
Creates and returns a ButtonModel for this ToggleAction. |
static ToggleAction |
createCheck(String actionName,
ResourceMap resourceMap,
com.jgoodies.binding.value.ValueModel subject)
Creates and returns a ToggleAction for the given ValueModel . |
static ToggleAction |
createCheck(String actionName,
ResourceMap resourceMap,
com.jgoodies.binding.value.ValueModel subject,
Object selectedValue,
Object deselectedValue)
Creates and returns a ToggleAction for the given ValueModel . |
static ToggleAction |
createRadio(String actionName,
ResourceMap resourceMap,
com.jgoodies.binding.value.ValueModel subject,
Object choice)
Creates and returns a ToggleAction for the given ValueModel
and choice value. |
boolean |
isCheckAction()
Checks and answers if this is an action intended for check components. |
boolean |
isRadioAction()
Checks and answers if this is an action intended for radio components. |
Methods inherited from class javax.swing.AbstractAction |
---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ToggleAction createCheck(String actionName, ResourceMap resourceMap, com.jgoodies.binding.value.ValueModel subject)
ValueModel
.
Useful to create JCheckButtons and JCheckButtonMenuItems.
actionName
- used to look up action properties in the resource mapresourceMap
- provides the action properties: name, icon, etc.subject
- holds the boolean toggle button state
public static ToggleAction createCheck(String actionName, ResourceMap resourceMap, com.jgoodies.binding.value.ValueModel subject, Object selectedValue, Object deselectedValue)
ValueModel
.
Useful to create JCheckButtons and JCheckButtonMenuItems.
actionName
- used to look up action properties in the resource mapresourceMap
- provides the action properties: name, icon, etc.subject
- holds the boolean toggle button stateselectedValue
- the subject value that represents the selected statedeselectedValue
- the subject value that represents the deselected state
public static ToggleAction createRadio(String actionName, ResourceMap resourceMap, com.jgoodies.binding.value.ValueModel subject, Object choice)
ValueModel
and choice value. Useful to create JRadioButtons and JRadioButtonMenuItems.
actionName
- used to look up action properties in the resource mapresourceMap
- provides the action properties: name, icon, etc.subject
- holds the boolean toggle button statechoice
- the subject value that represents the selected state
public void actionPerformed(ActionEvent evt)
evt
- the ignored eventpublic ButtonModel createButtonModel()
public boolean isCheckAction()
public boolean isRadioAction()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |