camera3d.action
Class VcAction

java.lang.Object
  extended bycamera3d.action.VcAction
Direct Known Subclasses:
DeleteAction, GeometryBagAction, GUIAction, LaserAction, MeasurerAction, VcLightAction, VcObjectChangeAction, VcViewAction

public abstract class VcAction
extends java.lang.Object

Abstract superclass to all VirtualCamera actions.

Version:
1.0
Author:
Fábio Roberto de Miranda

Field Summary
static int MULTIPLE_OBJECT_ACTION
          Constant for signaling that an action affects more than one object.
static int SINGLE_OBJECT_ACTION
          Constant for signaling that an action affects one single object.
 
Constructor Summary
VcAction()
           
 
Method Summary
 void debugln(java.lang.String s)
          Prints a debug message.
abstract  void doAction(ActionExecutor executor)
          Performs the action.
 int getMultiplicityType()
          Returns a flag indicating whether this action is applied to a single object or to a collection of them.
 boolean isUndoable()
          Returns a flag indicating whether the action can be undone.
 void setMultiplicityType(int i)
          Sets multiplicity flag for this action.
 void undoAction(ActionExecutor executor)
          Undoes the action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SINGLE_OBJECT_ACTION

public static final int SINGLE_OBJECT_ACTION
Constant for signaling that an action affects one single object.

See Also:
Constant Field Values

MULTIPLE_OBJECT_ACTION

public static final int MULTIPLE_OBJECT_ACTION
Constant for signaling that an action affects more than one object.

See Also:
Constant Field Values
Constructor Detail

VcAction

public VcAction()
Method Detail

getMultiplicityType

public int getMultiplicityType()
Returns a flag indicating whether this action is applied to a single object or to a collection of them.


setMultiplicityType

public void setMultiplicityType(int i)
Sets multiplicity flag for this action.


doAction

public abstract void doAction(ActionExecutor executor)
Performs the action.

Parameters:
executor - provides any resource necessary for the action execution, such as references to other objects.

undoAction

public void undoAction(ActionExecutor executor)
Undoes the action.

Parameters:
executor - provides any resource necessary for the action execution, such as references to other objects.

isUndoable

public boolean isUndoable()
Returns a flag indicating whether the action can be undone. It is used by ActionExecutor in order to select which actions should be pushed into the output queue. Currently, this method always returns true. In the future it should be turned into a abstract method, implemented by subclasses.


debugln

public void debugln(java.lang.String s)
Prints a debug message. Its execution is controlled by debugflag and GUIControl.debugflag.



Copyright © 2001-2003 F.R. Miranda, C.S. Santos, J.E. Kogler Jr.. All Rights Reserved.