|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sshtools.ui.awt.AbstractAction
public abstract class AbstractAction
Abstract implementation of an Action.
| Field Summary |
|---|
| Fields inherited from interface com.sshtools.ui.awt.Action |
|---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, HIDE_TOOLBAR_TEXT, IMAGE_PATH, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_IMAGE_PATH |
| Constructor Summary | |
|---|---|
AbstractAction(java.lang.String name)
Construct a new action with a name. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add a PropertyChangeListener that will be notified when
either a value changes or the enabled state changes |
java.lang.String |
getName()
Return the name of the action. |
java.lang.Object |
getValue(java.lang.String key)
Get the value for an attribute. |
boolean |
isEnabled()
Get if the component(s) that were built from this action should be enabled or not. |
void |
putValue(java.lang.String key,
java.lang.Object value)
Actions can have any number of attributes, each referenced by a key (a string). |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove a PropertyChangeListener from the list
that will be notified when either a value changes or the enabled state changes |
void |
setEnabled(boolean enabled)
Set if the component(s) that were built from this action should be enabled or not. |
| 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 AbstractAction(java.lang.String name)
name - | Method Detail |
|---|
public boolean isEnabled()
Action
isEnabled in interface Actionpublic void setEnabled(boolean enabled)
Action
setEnabled in interface Actionenabled - action enaqbledpublic java.lang.String getName()
ActionAppAction.getValue
using a key of AppAction.NAME.
getName in interface Action
public void putValue(java.lang.String key,
java.lang.Object value)
Action
putValue in interface Actionkey - keyvalue - valuepublic java.lang.Object getValue(java.lang.String key)
null will be returned
if no such attribute can be found.
getValue in interface Actionkey - attribute key
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
ActionPropertyChangeListener that will be notified when
either a value changes or the enabled state changes
addPropertyChangeListener in interface Actionl - listener to addpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
ActionPropertyChangeListener from the list
that will be notified when either a value changes or the enabled state changes
removePropertyChangeListener in interface Actionl - listener to remove
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||