public class ActionManager
extends java.lang.Object
implements java.awt.event.ActionListener
Modifier and Type | Field and Description |
---|---|
protected SharedAction[] |
actions
The shared actions to be controlled by the delegate.
|
protected java.util.Hashtable<java.lang.String,SharedAction> |
cacheActionByName
Remembers the tab IDs.
|
protected ActionDelegate |
delegate
Instance responsible for processing shared actions.
|
Constructor and Description |
---|
ActionManager()
Constructor for the action manager.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Reacts on component interaction.
|
void |
addAction(SharedAction action)
Adds a new action to be managed.
|
protected void |
finalize()
Clean-up method to help the gc.
|
SharedAction |
getAction(java.lang.String name)
Adds a new action to be managed.
|
SharedAction |
removeAction(SharedAction action)
Removes an action.
|
SharedAction |
removeAction(java.lang.String name)
Removes an action.
|
void |
setDelegate(ActionDelegate delegate)
Sets the instance responsible for processing shared actions.
|
protected java.util.Hashtable<java.lang.String,SharedAction> cacheActionByName
protected ActionDelegate delegate
protected SharedAction[] actions
public ActionManager()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void addAction(SharedAction action)
action
- The new action to be addedjava.lang.NullPointerException
- If parameter or action name is null
public SharedAction removeAction(java.lang.String name)
name
- The action namenull
if not removedjava.lang.NullPointerException
- If parameter is null
public SharedAction removeAction(SharedAction action)
action
- The actionnull
if not removedjava.lang.NullPointerException
- If parameter is null
public SharedAction getAction(java.lang.String name)
name
- The action namenull
if not managedjava.lang.NullPointerException
- If action name is null
public void setDelegate(ActionDelegate delegate)
null
parameter. If one
the action components is clicked then the delegate is advised to process the action.
delegate
- The delegate instance, null
deactives controlpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- Event to be processedCopyright © 2005-2013 Leisenfels UG (haftungsbeschränkt). All rights reserved.