Class ToolAction
java.lang.Object
com.sun.javatest.tool.ToolAction
- All Implemented Interfaces:
ActionListener, EventListener, Action
-
Field Summary
Fields inherited from interface 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
ConstructorsConstructorDescriptionToolAction(UIFactory uif, String key) Construct an internationalized action.ToolAction(UIFactory uif, String key, boolean needIcon) Construct an internationalized action.ToolAction(I18NResourceBundle i18n, String key) Construct an internationalized action.ToolAction(String name, String desc, int mnemonic) Construct an action with a specific mnemonic. -
Method Summary
Modifier and TypeMethodDescriptionvoidGets one of this object's properties using the associated key.booleanvoidSets one of this object's properties using the associated key.voidvoidsetEnabled(boolean newVal) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ActionListener
actionPerformed
-
Constructor Details
-
ToolAction
Construct an action with a specific mnemonic. This is the non-internationalized version and not recommended. SeeActionfor details on the parameters.- Parameters:
name- Name of this actiondesc- Description of this actionmnemonic- Mnemonic associated with this action- See Also:
-
ToolAction
-
ToolAction
Construct an internationalized action.- Parameters:
uif- Factory to use for getting strings.key- Key for retrieving internationalized strings from the bundle.needIcon- True if an icon resource should be associated with this action. Will be retrieved through the uif. And put into theSMALL_ICONproperty.- See Also:
-
ToolAction
Construct an internationalized action. The resources used are:uiKey.act the name for the button uiKey.tip the tool tip for the action uiKey.mne mnemonic for this action - Parameters:
i18n- Resource bundle to use when getting action propertieskey- Key for retrieving internationalized strings from the bundle.
-
-
Method Details
-
getValue
-
putValue
Sets one of this object's properties using the associated key. If the value has changed, aPropertyChangeEventis sent to listeners. -
isEnabled
-
setEnabled
public void setEnabled(boolean newVal) - Specified by:
setEnabledin interfaceAction
-
addPropertyChangeListener
- Specified by:
addPropertyChangeListenerin interfaceAction
-
removePropertyChangeListener
- Specified by:
removePropertyChangeListenerin interfaceAction
-