de.kosi.gui.action
Class CAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--de.kosi.gui.action.CAction
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, ResourceBundleChangeListener, java.io.Serializable
Direct Known Subclasses:
CRelayedAction, InvokeMethod

public abstract class CAction
extends javax.swing.AbstractAction
implements ResourceBundleChangeListener

CAction implements a localized action.

Author:
Jan-Christian Marinesse
See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
CAction(java.lang.String name)
          Initializes the action object.
 
Method Summary
 boolean checkEnabled()
          Tells whether this action should be enabled or not.
 java.lang.String getName()
          Returns this action's name which is different from it's name property.
 void resourceBundleChanged(CResourceBundle resourceBundle)
          This method is called, when the resourcebundle changes.
 
Methods inherited from class javax.swing.AbstractAction
actionPerformed, addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CAction

public CAction(java.lang.String name)
Initializes the action object.
Parameters:
name - the name of this action.
Method Detail

resourceBundleChanged

public void resourceBundleChanged(CResourceBundle resourceBundle)
This method is called, when the resourcebundle changes.
Specified by:
resourceBundleChanged in interface ResourceBundleChangeListener
Parameters:
resourceBundle - The resource bundle that changed.

getName

public java.lang.String getName()
Returns this action's name which is different from it's name property. We use this name to get the name property from the resource bundle.
Returns:
this action's name.

checkEnabled

public boolean checkEnabled()
Tells whether this action should be enabled or not.
Returns:
true if the action should be enabled. This implementation always returns true.