|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.fullspan.pwkeep.gui.PwkActionMgr
public class PwkActionMgr
This class contains a list of the actions that can be performed in
the user interface. It uses
reflection
to locate the appropriate handler method for each action. When
an action is performed by the user, the dispatchAction method
looks up the handler method and invokes it.
Actions handler methods are looked up based on a naming convention that
is described in the IPwkActionHandler interface. For an
example of an action handler, see the class
PwkGui.PwkActionHandler.
IPwkActionHandler,
PwkAction| Field Summary | |
|---|---|
protected static PwkAction[] |
ACTIONS
|
| Constructor Summary | |
|---|---|
PwkActionMgr(IPwkActionHandler actionHandler)
Creates a new action manager that will invoke the specified action handler each time an action is performed. |
|
| Method Summary | |
|---|---|
void |
dispatchAction(PwkAction action,
java.awt.event.ActionEvent actionEvent)
Dispatches the given action by invoking the action handler method for the given action. |
void |
enableActions(int selectionMask)
Enables or disables each action associated with this action manager based on the selection mask. |
PwkAction |
getAction(java.lang.String actionName)
Returns the action for the given name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final PwkAction[] ACTIONS
| Constructor Detail |
|---|
public PwkActionMgr(IPwkActionHandler actionHandler)
throws java.lang.NoSuchMethodException
The action handler must conform to the interface and the
action handler method naming conventions described by the
IPwkActionHandler interface.
actionHandler - the action handler
java.lang.NoSuchMethodException - if the action handler does not have
a method for each action in the list of actions associated with
this action managerIPwkActionHandler,
ACTIONS| Method Detail |
|---|
public PwkAction getAction(java.lang.String actionName)
actionName - the action name
public void dispatchAction(PwkAction action,
java.awt.event.ActionEvent actionEvent)
If an exception occurs when invoking the handler method, calls the
handleException method
dispatchAction in interface IPwkActionDispatcheraction - the actionactionEvent - the action eventIPwkActionDispatcher.dispatchAction(PwkAction, ActionEvent),
PwkAction.actionPerformed(ActionEvent)public void enableActions(int selectionMask)
selectionMask - the selection mask that describes the current
selection in the user interfacePwkAction.PwkAction(String, int)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||