Packagecom.yworks.support
Classpublic class MementoUndoableEdit
InheritanceMementoUndoableEdit Inheritance Object
Implements IUndoableEdit

An IUndoableEdit implementation that uses IMementoSupport to track changes on a set of items.



Public Methods
 MethodDefined By
  
MementoUndoableEdit(engine:UndoEngine, mementos:Iterable, undoName:String, redoName:String)
Creates a new instance using a set of MementoStateStructs.
MementoUndoableEdit
  
create(undoSupport:IUndoSupport, mementos:Iterable, undoName:String, redoName:String):MementoUndoableEdit
[static] Creates a new instance using a set of MementoStateStructs.
MementoUndoableEdit
  
endEdit():void
Ends the editing and enqueues appropriate IUndoUnits into the undo engine.
MementoUndoableEdit
Constructor Detail
MementoUndoableEdit()Constructor
public function MementoUndoableEdit(engine:UndoEngine, mementos:Iterable, undoName:String, redoName:String)

Creates a new instance using a set of MementoStateStructs.

Parameters
engine:UndoEngine — The engine that will be used to enqueue the undo units.
 
mementos:Iterable — The structs that hold the state information about a set of items.
 
undoName:String — The name for the undo units to create.
 
redoName:String — The name for the undo units to create.
Method Detail
create()method
public static function create(undoSupport:IUndoSupport, mementos:Iterable, undoName:String, redoName:String):MementoUndoableEdit

Creates a new instance using a set of MementoStateStructs.

Parameters

undoSupport:IUndoSupport — The support item that will be used to enqueue the undo units.
 
mementos:Iterable — The MementoStateStructs that hold the state information about a set of items.
 
undoName:String — The name for the undo units to create.
 
redoName:String — The name for the undo units to create.

Returns
MementoUndoableEdit
endEdit()method 
public function endEdit():void

Ends the editing and enqueues appropriate IUndoUnits into the undo engine. This method ends the editing process that has been initialized in IUndoSupport.beginEdit.

Calling this method will automatically enqueue the corresponding IUndoUnits into the corresponding IUndoSupport instance. The edits will be enqueued at the time of the creation of this instance.