org.apache.pivot.wtk
Class Action

java.lang.Object
  extended by org.apache.pivot.wtk.Action

public abstract class Action
extends Object

Abstract base class for "actions". Actions are common application behaviors generally triggered by buttons and keyboard shortcuts.


Nested Class Summary
static class Action.NamedActionDictionary
          Action dictionary implementation.
 
Constructor Summary
Action()
           
Action(boolean enabled)
           
 
Method Summary
static ListenerList<ActionClassListener> getActionClassListeners()
           
 ListenerList<ActionListener> getActionListeners()
           
 String getDescription()
          Returns a text description of the action.
static Action.NamedActionDictionary getNamedActions()
           
 boolean isEnabled()
           
abstract  void perform(Component source)
          Performs the action.
 void setEnabled(boolean enabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Action

public Action()

Action

public Action(boolean enabled)
Method Detail

getDescription

public String getDescription()
Returns a text description of the action. Subclasses should override this to return a meaningful description if one is needed.


perform

public abstract void perform(Component source)
Performs the action.

Parameters:
source - The component that initiated the action.

isEnabled

public boolean isEnabled()

setEnabled

public void setEnabled(boolean enabled)

getNamedActions

public static Action.NamedActionDictionary getNamedActions()

getActionListeners

public ListenerList<ActionListener> getActionListeners()

getActionClassListeners

public static ListenerList<ActionClassListener> getActionClassListeners()