com.sun.javatest.tool
public abstract class ToolAction extends java.lang.Object implements javax.swing.Action
Constructor and Description |
---|
ToolAction(I18NResourceBundle i18n,
java.lang.String key)
Construct an internationalized action.
|
ToolAction(java.lang.String name,
java.lang.String desc,
int mnemonic)
Construct an action with a specific mnemonic.
|
ToolAction(UIFactory uif,
java.lang.String key)
Construct an internationalized action.
|
ToolAction(UIFactory uif,
java.lang.String key,
boolean needIcon)
Construct an internationalized action.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
java.lang.Object |
getValue(java.lang.String key)
Gets one of this object's properties using the associated key.
|
boolean |
isEnabled() |
void |
putValue(java.lang.String key,
java.lang.Object newVal)
Sets one of this object's properties using the associated key.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
setEnabled(boolean newVal) |
public ToolAction(java.lang.String name, java.lang.String desc, int mnemonic)
Action
for details on the parameters.name
- Name of this actiondesc
- Description of this actionmnemonic
- Mnemonic associated with this actionAction
public ToolAction(UIFactory uif, java.lang.String key)
uif
- Factory to use for getting strings.key
- Key for retrieving internationalized strings from the
bundle.ToolAction(I18NResourceBundle,String)
public ToolAction(UIFactory uif, java.lang.String key, boolean needIcon)
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 the SMALL_ICON
property.ToolAction(I18NResourceBundle,String)
,
Action.SMALL_ICON
public ToolAction(I18NResourceBundle i18n, java.lang.String key)
uiKey.act | the name for the button |
uiKey.tip | the tool tip for the action |
uiKey.mne | mnemonic for this action |
i18n
- Resource bundle to use when getting action propertieskey
- Key for retrieving internationalized strings from the
bundle.public java.lang.Object getValue(java.lang.String key)
getValue
in interface javax.swing.Action
key
- the key of the property to be returnedputValue(java.lang.String, java.lang.Object)
public void putValue(java.lang.String key, java.lang.Object newVal)
PropertyChangeEvent
is sent
to listeners.putValue
in interface javax.swing.Action
key
- the key of the property to be storednewVal
- the new value for the propertypublic boolean isEnabled()
isEnabled
in interface javax.swing.Action
public void setEnabled(boolean newVal)
setEnabled
in interface javax.swing.Action
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface javax.swing.Action
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface javax.swing.Action
Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.