Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.dinopolis.util.gui
Class ActionStore  view ActionStore download ActionStore.java

java.lang.Object
  extended byorg.dinopolis.util.gui.ActionStore
All Implemented Interfaces:
ActionGenerator

public class ActionStore
extends java.lang.Object
implements ActionGenerator

This class represents a container for arbitrary actions. ActionStores are bound under a unique name and may be requested with this name again.

Version:
$Revision: 1.2 $

Field Summary
private  java.util.Hashtable actions_
          all possible actions
private static java.util.Hashtable instances_
          all possible actions instances
 
Constructor Summary
private ActionStore(java.lang.String key)
          Creates a new ActionStore that is bound under the given name key.
 
Method Summary
 void addAction(javax.swing.Action action)
          Adds the given action to this store.
 void addActions(javax.swing.Action[] actions)
          Adds the given actions to this store.
 javax.swing.Action getAction(java.lang.String key)
          Returns the action registered under key within this ActionStore, or null if no action was found.
 java.util.Enumeration getActionKeys()
          Returns an enumeration of all action keys within this ActionStore.
static ActionStore getStore(java.lang.String key)
          Returns the store that is bound under the given name, or null if no store is bound under this name.
 void removeAction(javax.swing.Action action)
          Removes the given action from this store.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

actions_

private java.util.Hashtable actions_
all possible actions


instances_

private static java.util.Hashtable instances_
all possible actions instances

Constructor Detail

ActionStore

private ActionStore(java.lang.String key)
Creates a new ActionStore that is bound under the given name key.

Method Detail

getStore

public static ActionStore getStore(java.lang.String key)
Returns the store that is bound under the given name, or null if no store is bound under this name.


addAction

public void addAction(javax.swing.Action action)
Adds the given action to this store.


addActions

public void addActions(javax.swing.Action[] actions)
Adds the given actions to this store.


removeAction

public void removeAction(javax.swing.Action action)
Removes the given action from this store.


getAction

public javax.swing.Action getAction(java.lang.String key)
Returns the action registered under key within this ActionStore, or null if no action was found.

Specified by:
getAction in interface ActionGenerator

getActionKeys

public java.util.Enumeration getActionKeys()
Returns an enumeration of all action keys within this ActionStore.


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).