com.sshtools.ui.awt
Interface Action

All Superinterfaces:
java.awt.event.ActionListener, java.util.EventListener
All Known Implementing Classes:
AbstractAction

public interface Action
extends java.awt.event.ActionListener

An extended ActionListener for AWT.

Author:
$Author: lee $

Field Summary
static java.lang.String ACCELERATOR_KEY
          Key used for storing a KeyStroke for the accelerator for the action.
static java.lang.String ACTION_COMMAND_KEY
           
static java.lang.String HIDE_TOOLBAR_TEXT
          Boolean value to specify if text should be shown when this action is used to build components for an ActionBar
static java.lang.String IMAGE_PATH
          Key for a String value to specify the resource name for the icon
static java.lang.String LONG_DESCRIPTION
          Key for storing a long description for the action.
static java.lang.String MNEMONIC_KEY
          Key for storing an Integer object to be used as the mnemonic for the action.
static java.lang.String NAME
          Key used for storing the action name
static java.lang.String SHORT_DESCRIPTION
          Key for a short description for the action, used for tooltip text.
static java.lang.String SMALL_IMAGE_PATH
          Key for a String value to specify the resource name for the small icon
 
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)
          Actions can have any number of attributes, each referenced by a key (a string).
 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 interface java.awt.event.ActionListener
actionPerformed
 

Field Detail

NAME

static final java.lang.String NAME
Key used for storing the action name

See Also:
Constant Field Values

SHORT_DESCRIPTION

static final java.lang.String SHORT_DESCRIPTION
Key for a short description for the action, used for tooltip text.

See Also:
Constant Field Values

LONG_DESCRIPTION

static final java.lang.String LONG_DESCRIPTION
Key for storing a long description for the action.

See Also:
Constant Field Values

ACTION_COMMAND_KEY

static final java.lang.String ACTION_COMMAND_KEY
See Also:
Constant Field Values

ACCELERATOR_KEY

static final java.lang.String ACCELERATOR_KEY
Key used for storing a KeyStroke for the accelerator for the action.

See Also:
Constant Field Values

MNEMONIC_KEY

static final java.lang.String MNEMONIC_KEY
Key for storing an Integer object to be used as the mnemonic for the action.

See Also:
Constant Field Values

SMALL_IMAGE_PATH

static final java.lang.String SMALL_IMAGE_PATH
Key for a String value to specify the resource name for the small icon

See Also:
Constant Field Values

IMAGE_PATH

static final java.lang.String IMAGE_PATH
Key for a String value to specify the resource name for the icon

See Also:
Constant Field Values

HIDE_TOOLBAR_TEXT

static final java.lang.String HIDE_TOOLBAR_TEXT
Boolean value to specify if text should be shown when this action is used to build components for an ActionBar

See Also:
Constant Field Values
Method Detail

getValue

java.lang.Object getValue(java.lang.String key)
Actions can have any number of attributes, each referenced by a key (a string). null will be returned if no such attribute exists

Parameters:
key - key
Returns:
action attribute value

putValue

void putValue(java.lang.String key,
              java.lang.Object value)
Actions can have any number of attributes, each referenced by a key (a string).

Parameters:
key - key
value - value

getName

java.lang.String getName()
Return the name of the action. Same as doing AppAction.getValue using a key of AppAction.NAME.

Returns:
action name

isEnabled

boolean isEnabled()
Get if the component(s) that were built from this action should be enabled or not.

Returns:
enabled

setEnabled

void setEnabled(boolean enabled)
Set if the component(s) that were built from this action should be enabled or not.

Parameters:
enabled - action enaqbled

addPropertyChangeListener

void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add a PropertyChangeListener that will be notified when either a value changes or the enabled state changes

Parameters:
l - listener to add

removePropertyChangeListener

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

Parameters:
l - listener to remove


Copyright © 2003-2004 3SP LTD. All Rights Reserved.