VLab Common 1.2

pl.psnc.vlab.util.gui.action
Class AbstractActionDefault

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by pl.psnc.vlab.util.gui.action.AbstractActionDefault
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, ActionDecorator
Direct Known Subclasses:
LocalizedAbstractAction

public abstract class AbstractActionDefault
extends javax.swing.AbstractAction
implements ActionDecorator

AbstractActionDefault - this class provides default implementations for the JFC Action interface

Author:
Dominik Stoklosa (~osa~)
See Also:
Serialized Form
Email address
osa@man.poznan.pl

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface pl.psnc.vlab.util.gui.action.ActionDecorator
DISABLED_ICON, PARENT_OBJECT
 
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
AbstractActionDefault(javax.swing.Icon icon)
          Define an Action Object with a specified action icon.
AbstractActionDefault(java.lang.String name, javax.swing.Icon icon)
          Define an Action Object with a specified action name and icon.
AbstractActionDefault(java.lang.String name, javax.swing.Icon icon, java.lang.String description)
          Define an Action Object with a specified action name, icon and short description.
 
Method Summary
abstract  void actionPerformed(java.awt.event.ActionEvent e)
           
 void addSource(java.awt.Component component)
          Add source component of this action - the component associated with this action.
 javax.swing.ImageIcon getDisabledActionIcon()
          Get disabled icon for this ActionDecorator
 java.lang.String getName()
          Get action name
 java.lang.String getShortDescription()
          Get short description for this ActionDecorator
 java.util.List<java.awt.Component> getSources()
          Get source components which were associated with this action
 void setAcceleratorKey(java.lang.String accelerator)
          Set Accelerator key.
 void setDisabledActionIcon(javax.swing.ImageIcon icon)
          Set disabled icon for this ActionDecorator
 void setIcon(javax.swing.Icon icon)
          Set icon for the specified action
 void setMnemonic(char mnemonic)
          Set Mnemonic key.
 void setName(java.lang.String name)
          Set action name
 void setShortDescription(java.lang.String description)
          Set short description for this ActionDecorator
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractActionDefault

public AbstractActionDefault(java.lang.String name,
                             javax.swing.Icon icon)
Define an Action Object with a specified action name and icon.

Parameters:
name - name of the action
icon - the icon for the current action

AbstractActionDefault

public AbstractActionDefault(java.lang.String name,
                             javax.swing.Icon icon,
                             java.lang.String description)
Define an Action Object with a specified action name, icon and short description.

Parameters:
name - name of the action
icon - the icon for the current action
description - action short description

AbstractActionDefault

public AbstractActionDefault(javax.swing.Icon icon)
Define an Action Object with a specified action icon.

Parameters:
icon - the icon for the current action
Method Detail

getName

public java.lang.String getName()
Description copied from interface: ActionDecorator
Get action name

Specified by:
getName in interface ActionDecorator
Returns:
action name

setName

public void setName(java.lang.String name)
Description copied from interface: ActionDecorator
Set action name

Specified by:
setName in interface ActionDecorator

actionPerformed

public abstract void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

setAcceleratorKey

public void setAcceleratorKey(java.lang.String accelerator)
Description copied from interface: ActionDecorator
Set Accelerator key. The key used for storing a KeyStroke to be used as the accelerator for the action.

Specified by:
setAcceleratorKey in interface ActionDecorator
Parameters:
accelerator - accelerator

setDisabledActionIcon

public void setDisabledActionIcon(javax.swing.ImageIcon icon)
Description copied from interface: ActionDecorator
Set disabled icon for this ActionDecorator

Specified by:
setDisabledActionIcon in interface ActionDecorator
Parameters:
icon - disabled action

getDisabledActionIcon

public javax.swing.ImageIcon getDisabledActionIcon()
Description copied from interface: ActionDecorator
Get disabled icon for this ActionDecorator

Specified by:
getDisabledActionIcon in interface ActionDecorator
Returns:
disabled icon for this ActionDecorator

setMnemonic

public void setMnemonic(char mnemonic)
Description copied from interface: ActionDecorator
Set Mnemonic key. The key used for storing an int key code to be used as the mnemonic for the action.

Specified by:
setMnemonic in interface ActionDecorator
Parameters:
mnemonic - mnemonic

setShortDescription

public void setShortDescription(java.lang.String description)
Description copied from interface: ActionDecorator
Set short description for this ActionDecorator

Specified by:
setShortDescription in interface ActionDecorator
Parameters:
description - short description

getShortDescription

public java.lang.String getShortDescription()
Description copied from interface: ActionDecorator
Get short description for this ActionDecorator

Specified by:
getShortDescription in interface ActionDecorator
Returns:
short description for this ActionDecorator

setIcon

public void setIcon(javax.swing.Icon icon)
Set icon for the specified action


addSource

public void addSource(java.awt.Component component)
Description copied from interface: ActionDecorator
Add source component of this action - the component associated with this action.

Specified by:
addSource in interface ActionDecorator

getSources

public java.util.List<java.awt.Component> getSources()
Description copied from interface: ActionDecorator
Get source components which were associated with this action

Specified by:
getSources in interface ActionDecorator
Returns:
source components which were associated with this action. Instance of Component

VLab Common 1.2

Copyright 2004 by VLAB Dominik Stoklosa.