| Package | com.yworks.support |
| Class | public class MementoUndoableEdit |
| Inheritance | MementoUndoableEdit Object |
| Implements | IUndoableEdit |
IUndoableEdit implementation that uses IMementoSupport
to track changes on a set of items.
| Method | Defined By | ||
|---|---|---|---|
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 | ||
| MementoUndoableEdit | () | Constructor |
public function MementoUndoableEdit(engine:UndoEngine, mementos:Iterable, undoName:String, redoName:String)
Creates a new instance using a set of MementoStateStructs.
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.
|
| 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.
|
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.