|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface describes a Mica Action. An action is generated by a graphics MiPart (often in response to Events generated by users). Usually this occurs when the MiPart changes in some way, either geometrically (it moved or changed size), visibly (changed color, became visible, etc.) or state (it was selected, deselected).
MiiActions are designed so that usually it itself contains a reference to the action handler (observer) it will be dispatched to. In this way, actions are not constructed and destroyed when they are dispatched, they just have their context dependent data modified and are sent on to the handler.
MiiActionHandler,
MiiActionTypes,
MiPart.appendActionHandler(com.swfm.mica.core.MiiAction, com.swfm.mica.events.MiEvent)| Field Summary |
| Method Summary | |
MiiActionHandler |
getActionHandler()
Gets the action handler this action will be dispatched to. |
MiPart |
getActionSource()
Gets the MiPart that originally generated the action. |
java.lang.Object |
getActionSystemInfo()
Gets the system information field of this action. |
int |
getActionType()
Gets the actual type of this dispatched action. |
java.lang.Object |
getActionUserInfo()
Gets the user information field of this action. |
MiPart |
getObservedObject()
Gets the MiPart that dispatched the action to the MiiActionHandler. |
int |
getPhase()
Gets the phase of this dispatched action. |
java.lang.Object |
getResource(java.lang.String name)
Gets the value of the given named resource. |
java.lang.String |
getValidActionsString()
For debug, gets a text string describing the action types that this action is watching for/handling. |
boolean |
hasActionType(int actionType)
Gets whether the actual type of this dispatched action is the same as the given type. |
boolean |
isInterestedInActionsOfPartsOfObserved()
Gets whether this action is interested in actions of the parts of the MiPart this action is assigned to. |
boolean |
isPhase(int phase)
Gets whether the given phase is the phase of this dispatched action. |
boolean |
isValidActionType(int actionType)
Gets whether given action type is an action type for which this action will be dispatched to it's action handler. |
boolean |
isVetoed()
Gets whether this action, in the request phase, is saying no to the request. |
void |
setActionHandler(MiiActionHandler handler)
Sets the action handler this action will be dispatched to. |
void |
setActionSource(MiPart source)
Sets the MiPart that originally generated the action. |
void |
setActionSystemInfo(java.lang.Object info)
Sets the system information field of this action. |
void |
setActionType(int actionType)
Sets the actual type of this dispatched action. |
void |
setActionUserInfo(java.lang.Object info)
Sets the user information field of this action. |
void |
setObservedObject(MiPart source)
Sets the MiPart that dispatched the action to the MiiActionHandler. |
void |
setResource(java.lang.String name,
java.lang.Object value)
Adds (if necessary) and sets the given named resource to the given value. |
void |
setVetoed(boolean flag)
Sets whether this action, in the request phase, is saying no to the request. |
void |
veto()
Specifies that this action, in the request phase, is saying no to the request. |
| Method Detail |
public void setActionSource(MiPart source)
source - the part that generated the actionpublic MiPart getActionSource()
public void setObservedObject(MiPart source)
source - the part that dispatched the actionpublic MiPart getObservedObject()
public void setActionHandler(MiiActionHandler handler)
handler - the action handler to send this
action topublic MiiActionHandler getActionHandler()
public void setActionType(int actionType)
isValidActionType(int)public int getActionType()
isValidActionType(int)public boolean hasActionType(int actionType)
getActionType(),
isValidActionType(int)public boolean isValidActionType(int actionType)
isValidActionType(int)public void setActionUserInfo(java.lang.Object info)
info - the information supplied by the
programmer.getActionUserInfo()public java.lang.Object getActionUserInfo()
setActionUserInfo(java.lang.Object)public void setActionSystemInfo(java.lang.Object info)
info - the information supplied by the
generator of the action or null.setActionUserInfo(java.lang.Object),
getActionSystemInfo()public java.lang.Object getActionSystemInfo()
getActionUserInfo(),
setActionSystemInfo(java.lang.Object)
public void setResource(java.lang.String name,
java.lang.Object value)
name - the resource namevalue - the resource value (non-null)getResource(java.lang.String)public java.lang.Object getResource(java.lang.String name)
name - the resource namesetResource(java.lang.String, java.lang.Object)public boolean isPhase(int phase)
phase - the possible phase of this action
public int getPhase()
public boolean isInterestedInActionsOfPartsOfObserved()
public void veto()
public boolean isVetoed()
public void setVetoed(boolean flag)
flag - true if vetoedpublic java.lang.String getValidActionsString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||