Packagenet.systemeD.halcyon.connection
Classpublic class UndoableEntityAction
InheritanceUndoableEntityAction Inheritance UndoableAction
SubclassesAddMemberToRelationAction, AddNodeToWayAction, CreateEntityAction, DeleteNodeAction, DeleteRelationAction, DeleteWayAction, MoveNodeAction, RemoveEntityFromRelationAction, RemoveMemberByIndexAction, RemoveNodeByIndexAction, RemoveNodeFromWayAction, ReverseNodesAction, SetTagAction, SetTagKeyAction

An UndoableEntityAction is an action that affects an entity. The allows the clean/dirty status of both the individual entity and the connection as a whole to be tracked correctly when doing an action, undoing it and redoing it. Individual entity actions extend this class in order to do useful things.



Public Properties
 PropertyDefined by
  connectionWasDirty : Boolean
UndoableEntityAction
  wasDirty : Boolean
UndoableEntityAction
Protected Properties
 PropertyDefined by
  entity : Entity
UndoableEntityAction
  name : String
UndoableEntityAction
Public Methods
 MethodDefined by
  
UndoableEntityAction(entity:Entity, name:String)
Create a new UndoableEntityAction.
UndoableEntityAction
 Inherited
doAction():uint
The doAction function is called when it is time to execute this action or combination of actions.
UndoableAction
 Inherited
mergePrevious(previous:UndoableAction):Boolean
Can this action be merged with the previous action? This is sometimes wanted, such as when moving nodes around.
UndoableAction
  
toString():String
UndoableEntityAction
 Inherited
undoAction():uint
The undoAction function is called in order to undo this action or combination of actions.
UndoableAction
Protected Methods
 MethodDefined by
  
markClean():void
Mark this action as clean.
UndoableEntityAction
  
markDirty():void
Mark this action as dirty.
UndoableEntityAction
Public Constants
 ConstantDefined by
 InheritedFAIL : uint = 0
[static] Something went wrong while attempting the action
UndoableAction
 InheritedNO_CHANGE : uint = 2
[static] No entity was altered by this action
UndoableAction
 InheritedSUCCESS : uint = 1
[static] The action worked, and entities were changed
UndoableAction
Property detail
connectionWasDirtyproperty
public var connectionWasDirty:Boolean
entityproperty 
protected var entity:Entity
nameproperty 
protected var name:String
wasDirtyproperty 
public var wasDirty:Boolean
Constructor detail
UndoableEntityAction()constructor
public function UndoableEntityAction(entity:Entity, name:String)

Create a new UndoableEntityAction. Usually called as super() from a subclass

Parameters
entity:Entity — The entity that it being modified
 
name:String — The name of this action, useful for debugging.
Method detail
markClean()method
protected function markClean():void

Mark this action as clean. This will entity and/or connection clean, as appropriate, based on whether they were clean before this action started.

markDirty()method 
protected function markDirty():void

Mark this action as dirty. This will mark the entity and/or connection dirty, as appropriate.

toString()method 
public function toString():String

Returns
String