Class PBASAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
- Direct Known Subclasses:
PAboutAction
,PARAdjustAction
,PARBillNowAction
,PARChargeCCAction
,PARRefundAction
,PARWriteOffAction
,PBackAction
,PBASToggleAction
,PChangePasswordAction
,PCopyAction
,PCutAction
,PDefaultContextHelpAction
,PDefaultHelpAction
,PDefaultHelpIDAction
,PEventBrowserAction
,PExitAction
,PGoToBalanceAction
,PGoToHierarchyAction
,PGoToPaymentAction
,PGoToProductAction
,PGoToServiceAction
,PGoToSponsorshipAction
,PGoToSummaryAction
,PHomePageAction
,PNewAccountAction
,PNotesAction
,PPasteAction
,PPermissionAction
,PPrefsAction
,PPrintAction
,PPrintSetupAction
,PPurchaseOfferingAction
,PRefreshAction
,PSaveAction
,PSearchAction
,PVoucherAction
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
.- Version:
- 6
- Author:
- Larry Lynch-Freshner
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Constant used to store accelerator property information in the action class.static final String
Constant used to store property information in action classstatic final String
Constant used to store icon property information in the action class.static final String
Constant used to store icon property information in the action class.static final String
Constant used to store icon property information in the action class.static final String
Constant used to store icon property information in the action class.static final String
Constant used to store icon property information in the action class.static final String
Constant used to store mnemonic property information in the action class.static final String
Constant used to store icon property information in the action class.static final String
Constant used to indicate the label that should appear for a toolbar button.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
-
Constructor Summary
ConstructorsConstructorDescriptionPBASAction
(PClientComponent comp, String tag) Creates a newPBASAction
from a supplied component and resource tag.PBASAction
(PClientComponent comp, String tag, String helpID) Creates a newPBASAction
from a supplied component, resource tag, and helpID.PBASAction
(String tag) Creates a newPBASAction
from a supplied component and resource tag. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests whether a supplied object is equal to thisPBASAction
.Gets theAction
target.Gets the help ID associated with this action.Gets the name of the menu to which this action should be added.getTag()
Gets the property tag used to load action resources.boolean
Handles errors that occur duringactionPerformed
.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.Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
-
Field Details
-
ACCEL
Constant used to store accelerator property information in the action class.- See Also:
-
MNEM
Constant used to store mnemonic property information in the action class.- See Also:
-
TOOL_TITLE
Constant used to store icon property information in the action class.- See Also:
-
ICON_DISABLED
Constant used to store property information in action class- See Also:
-
ICON_DISABLED_SELECTED
Constant used to store icon property information in the action class.- See Also:
-
ICON_SELECTED
Constant used to store icon property information in the action class.- See Also:
-
ICON_ROLLOVER
Constant used to store icon property information in the action class.- See Also:
-
ICON_ROLLOVER_SELECTED
Constant used to store icon property information in the action class.- See Also:
-
ICON_PRESSED
Constant used to store icon property information in the action class.- See Also:
-
TOOLBAR_LABEL
Constant used to indicate the label that should appear for a toolbar button. When using PToolBar, Action.NAME will be ignored and this used instead. Menu items will still refer to Action.NAME - this allows you to use one action in both widgets and not have a label appear in the toolbar unless you explicitely want it to.- See Also:
-
-
Constructor Details
-
PBASAction
Creates a newPBASAction
from a supplied component and resource tag.- Parameters:
tag
- aString
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
-
PBASAction
Creates a newPBASAction
from a supplied component and resource tag.- Parameters:
comp
- the target component of this actiontag
- aString
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
-
PBASAction
Creates a newPBASAction
from a supplied component, resource tag, and helpID.- Parameters:
comp
- the component this action will act upontag
- aString
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 action
-
-
Method Details
-
setPreferredMenu
Sets the name of the menu this action should be added to if and when it is displayed in a menu bar. The default value is null, which causes the action to not be added to any menu. Submenus must be separated by periods (.), for example, "file.import".- Parameters:
menuStr
- the name of the menu to add to. This is the name of the menu before localization.
-
getPreferredMenu
Gets the name of the menu to which this action should be added.- Returns:
- A
String
name for the menu.
-
getTag
Gets the property tag used to load action resources.- Returns:
- A
String
tag.
-
getHelpID
Gets the help ID associated with this action.- Returns:
- A
String
help identifier.
-
setActionHelpOn
Sets up help. Can only be called after the action is set on a component.- Parameters:
comp
- theAction
trigger component
-
getComponent
Gets theAction
target.- Returns:
- A
GUIComponent
.
-
handleError
Handles errors that occur duringactionPerformed
.- Parameters:
e
- the exception that occured- Returns:
- True if the error is handled; false otherwise.
-
equals
Tests whether a supplied object is equal to thisPBASAction
.
-