Package | com.yworks.support |
Interface | public interface IUndoSupport |
ILookup.lookup
for entities that support undoability.
See also
Method | Defined By | ||
---|---|---|---|
Directly enqueues a custom IUndoUnit into the queue that this instance represents. | IUndoSupport | ||
beginCompoundEdit(undoName:String, redoName:String):ICompoundEdit
Starts a compound unit of edits. | IUndoSupport | ||
Calling this method indicates to the callee that items are going to be modified. | IUndoSupport |
addUnit | () | method |
public function addUnit(unit:IUndoUnit):void
Directly enqueues a custom IUndoUnit
into the queue that this instance represents.
Parameters
unit:IUndoUnit — The unit to place onto the undo stack.
|
See also
beginCompoundEdit | () | method |
public function beginCompoundEdit(undoName:String, redoName:String):ICompoundEdit
Starts a compound unit of edits.
This method can be used to create a bracketing effect. All edits added to the queue after this call
and before a call to ICompoundEdit.cancel
or ICompoundEdit.end
will be placed
into the queue as a single block. Client code needs to make sure that either the
ICompoundEdit.cancel
or ICompoundEdit.end
method is called on the returned instance.
Implementations should store the state of the current subject at this point and track subsequent changes,
until ICompoundEdit.end
has been called.
Parameters
undoName:String — The undo name for the compound edit.
| |
redoName:String — The redo name for the compound edit.
|
ICompoundEdit — The handle to call ICompoundEdit.cancel or ICompoundEdit.end on.
|
beginEdit | () | method |
public function beginEdit(undoName:String, redoName:String, items:Iterable):IUndoableEdit
Calling this method indicates to the callee that items
are going to be modified.
The implementation will return an implementation of IUndoableEdit
whose
IUndoableEdit.endEdit
method needs to be called by the client after the changes to
items
have been done. Calling this method will immediately enqueue an
IUndoUnit
into the undo queue. Subsequent additions to the queue will be added
after the created instance, even if they are added to the queue before the
IUndoableEdit.endEdit
method has been called.
Parameters
undoName:String — The IUndoUnit.undoName of the IUndoUnit
that will be placed into the undo queue after IUndoableEdit.endEdit has been called.
| |
redoName:String — The IUndoUnit.redoName of the IUndoUnit
that will be placed into the undo queue after IUndoableEdit.endEdit has been called.
| |
items:Iterable — The items that will be changed after this call and before the call to
IUndoableEdit.endEdit .
|
IUndoableEdit — An implementation of the IUndoableEdit interface whose endEdit
method needs to be called after the items have been modified.
|