public abstract class PBASAction extends AbstractAction
PBASAction is the BAS Action command base. Given a resource tag,
the action's name, icon, tooltext, and other information are retrieved from the
resource file provided by PViewComponent.| Modifier and Type | Field and Description |
|---|---|
static String |
ACCEL
Constant used to store accelerator property information in the action class.
|
static String |
ICON_DISABLED
Constant used to store property information in action class
|
static String |
ICON_DISABLED_SELECTED
Constant used to store icon property information in the action class.
|
static String |
ICON_PRESSED
Constant used to store icon property information in the action class.
|
static String |
ICON_ROLLOVER
Constant used to store icon property information in the action class.
|
static String |
ICON_ROLLOVER_SELECTED
Constant used to store icon property information in the action class.
|
static String |
ICON_SELECTED
Constant used to store icon property information in the action class.
|
static String |
MNEM
Constant used to store mnemonic property information in the action class.
|
static String |
TOOL_TITLE
Constant used to store icon property information in the action class.
|
static String |
TOOLBAR_LABEL
Constant used to indicate the label that should appear for a toolbar
button.
|
changeSupport, 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 |
|---|
PBASAction(PClientComponent comp,
String tag)
Creates a new
PBASAction from a supplied component and resource tag. |
PBASAction(PClientComponent comp,
String tag,
String helpID)
Creates a new
PBASAction from a supplied component, resource tag, and helpID. |
PBASAction(String tag)
Creates a new
PBASAction from a supplied component and resource tag. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
Tests whether a supplied object is equal to this
PBASAction. |
PClientComponent |
getComponent()
Gets the
Action target. |
String |
getHelpID()
Gets the help ID associated with this action.
|
String |
getPreferredMenu()
Gets the name of the menu to which this action should be added.
|
String |
getTag()
Gets the property tag used to load action resources.
|
boolean |
handleError(Throwable e)
Handles errors that occur during
actionPerformed. |
void |
setActionHelpOn(Component comp)
Sets up help.
|
void |
setPreferredMenu(String menuStr)
Sets the name of the menu this action should be added to if and
when it is displayed in a menu bar.
|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledfinalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactionPerformedpublic static final String ACCEL
public static final String MNEM
public static final String TOOL_TITLE
public static final String ICON_DISABLED
public static final String ICON_DISABLED_SELECTED
public static final String ICON_SELECTED
public static final String ICON_ROLLOVER
public static final String ICON_ROLLOVER_SELECTED
public static final String ICON_PRESSED
public static final String TOOLBAR_LABEL
public PBASAction(String tag)
PBASAction from a supplied component and resource tag.tag - a String that contains the resource tag from which to look
up the informationThe 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 PBASAction(PClientComponent comp, String tag)
PBASAction from a supplied component and resource tag.comp - the target component of this actiontag - a String that contains the resource tag used to look
up the informationThe 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 PBASAction(PClientComponent comp, String tag, String helpID)
PBASAction from a supplied component, resource tag, and helpID.comp - the component this action will act upontag - a String that contains the resource tag used to look
up the informationThe name is expected at: <component resource base>.tag.name
The description is expected at: <component resource base>.tag.desc
The accelerator is expected at: <component resource base>.tag.accel
The mnemonic is expected at: <component resource base>.tag.mnemonic
The preferred menu is expected at: <component resource base>.tag.menu
The icon is expected at: <component resource base>.tag.icon
The disabled icon is expected at: <component resource base>.tag.icon.disabled
The selected icon is expected at: <component resource base>.tag.icon.selected
The pressed icon is expected at: <component resource base>.tag.icon.pressed
The rollover icon is expected at: <component resource base>.tag.icon.rollover
The disabled selected icon is expected at: <component resource base>.tag.icon.disabled.selected
The rollover selected icon is expected at: <component resource base>.tag.icon.rollover.selected
Accelerator format is: <mod>-<key>
where <mod> is any combination of A, S, or C for Alt, Shift, or Control and <key> is A-z, F1-F12, and so on.
helpID - the help ID for this actionpublic void setPreferredMenu(String menuStr)
menuStr - the name of the menu to add to. This is the name of the menu
before localization.public String getPreferredMenu()
String name for the menu.public String getTag()
String tag.public String getHelpID()
String help identifier.public void setActionHelpOn(Component comp)
comp - the Action trigger componentpublic PClientComponent getComponent()
Action target.GUIComponent.public boolean handleError(Throwable e)
actionPerformed.e - the exception that occuredCopyright © 2003, 2023, Oracle and/or its affiliates.