public abstract class PBASToggleAction extends PBASAction
PBASToggleAction is a base for PBASAction actions
that toggle, for example, checkboxes, which add state information to
PBASAction and must be rendered differently.ACCEL, ICON_DISABLED, ICON_DISABLED_SELECTED, ICON_PRESSED, ICON_ROLLOVER, ICON_ROLLOVER_SELECTED, ICON_SELECTED, MNEM, TOOL_TITLE, TOOLBAR_LABELchangeSupport, enabledACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON| Constructor and Description |
|---|
PBASToggleAction(PClientComponent comp,
String tag)
Creates a new
Action from a supplied component and resource tag. |
PBASToggleAction(PClientComponent comp,
String tag,
String helpID)
Creates a new
Action from a supplied component, resource tag, and help ID. |
PBASToggleAction(String tag)
Creates a new
Action from a supplied component and resource tag. |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent evt)
Default
actionPerformed method that tracks state changes. |
boolean |
getState()
Gets the state of the control created or to be created by this action.
|
void |
setState(boolean state)
Sets the state of the control created or to be created by this action.
|
equals, getComponent, getHelpID, getPreferredMenu, getTag, handleError, setActionHelpOn, setPreferredMenuaddPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledpublic PBASToggleAction(String tag)
Action from a supplied component and resource tag.comp - the component this action will act upontag - the resource tag used to look up info from.The icon is expected at: <component resource base>.tag.icon
The name is expected at: <component resource base>.tag.name
The description is expected at: <component resource base>.tag.desc
public PBASToggleAction(PClientComponent comp, String tag)
Action from a supplied component and resource tag.comp - the target component of this actiontag - the resource tag used to look up information.The icon is expected at: <component resource base>.tag.icon
The name is expected at: <component resource base>.tag.name
The description is expected at: <component resource base>.tag.desc
public PBASToggleAction(PClientComponent comp, String tag, String helpID)
Action from a supplied component, resource tag, and help ID.comp - the target component of this actiontag - the resource tag used to look up information.The icon is expected at: <component resource base>.tag.icon
The name is expected at: <component resource base>.tag.name
The description is expected at: <component resource base>.tag.desc
helpID - The help ID for this action.public void setState(boolean state)
state - the button's statepublic boolean getState()
public void actionPerformed(ActionEvent evt)
actionPerformed method that tracks state changes.
Subclasses that override this method need to call
super.actionPerformed().evt - the action eventCopyright © 2003, 2023, Oracle and/or its affiliates.