|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.javatest.tool.ToolAction
public abstract class ToolAction
Standard template for creation of an Action to be used in a Tool.
Field Summary |
---|
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 | |
---|---|
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. |
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.awt.event.ActionListener |
---|
actionPerformed |
Constructor Detail |
---|
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.Method Detail |
---|
public java.lang.Object getValue(java.lang.String key)
getValue
in interface javax.swing.Action
key
- the key of the property to be returned
putValue(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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |