|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.swfm.mica.core.MiActionManager
This class is a globally accessible (i.e. it is a singleton) API to the valid action registry. All possible action types and their names are stored here. This manager allows components outside of Mica to generate actions that look and behave just like Mica's built-in actions. This is accomplished by a component registering it's unique action names with this manager and getting back unique action type values. These values can be used anywhere just like Mica action types (e.g. Mi_COPY_ACTION). For example: the Mica-supplied MiPlayerPanel class contains the following lines which allow the users of the class to access and use it's action type (Mi_PLAYER_PANEL_ACTION) just like a Mica built-in action types: public static final String Mi_PLAYER_PANEL_ACTION_NAME = "playerPanelStateChange"; public static final int Mi_PLAYER_PANEL_ACTION = MiActionManager.registerAction(Mi_PLAYER_PANEL_ACTION_NAME);
MiAction| Field Summary |
| Constructor Summary | |
MiActionManager()
|
|
| Method Summary | |
static java.lang.String |
getNameOfRegisteredAction(int actionType)
Gets the name of the given registered action type. |
static java.lang.String[] |
getNamesOfRegisteredActions()
Gets the names of all registered actions. |
static int |
getNumberOfRegisteredActions()
Gets the number of registered actions, which is the total number of all valid actions in the system. |
static int |
getTypeOfRegisteredAction(java.lang.String actionName)
Gets the action type of the given registered action name. |
static int |
registerAction(java.lang.String actionName)
Registers the given action name and returns an action type value that can be used for this new action. |
static int |
registerAction(java.lang.String actionName,
boolean reuseExistingActionIfAvailable)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MiActionManager()
| Method Detail |
public static int registerAction(java.lang.String actionName)
actionName - the name of the action
java.lang.IllegalArgumentException - action
name already exists
public static int registerAction(java.lang.String actionName,
boolean reuseExistingActionIfAvailable)
public static int getNumberOfRegisteredActions()
public static java.lang.String[] getNamesOfRegisteredActions()
public static java.lang.String getNameOfRegisteredAction(int actionType)
public static int getTypeOfRegisteredAction(java.lang.String actionName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||