|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.java.joglutils.msg.actions.Action
public abstract class Action
The base class of all actions, which are applied to nodes in the scene graph to implement operations such as rendering.
Subclasses of Action should define, by convention, a method
public static State getDefaultState()returning a
State
object, which is used to enable the elements in the state which
should be updated by the action's traversal of nodes. Each Action
instance maintains a State object internally which is initialized
from this default. Note that different actions may enable
different elements of the global state.
Subclasses of Action should also define, by convention, a method
public static void addActionMethod(Class<? extends Node> nodeType, Method m)which is used to add action methods to the particular Action class. This may be used by developers to attach new functionality to the Action for new node types they define.
Constructor Summary | |
---|---|
Action()
|
Method Summary | |
---|---|
protected void |
apply(ActionTable table,
Node node)
Invokes the appropriate action method for the given Node. |
abstract void |
apply(Node node)
Applies this Action to a particular node. |
Path |
getPath()
Returns the path to the node currently being traversed. |
abstract State |
getState()
Returns the global state this action encompasses, which is altered by the nodes the action traverses. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Action()
Method Detail |
---|
public abstract void apply(Node node)
public abstract State getState()
public Path getPath()
protected void apply(ActionTable table, Node node)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |