public static class GTFrameTools.DelegatedUndoStackAttribute extends UndoStackAttribute
NamedObj.ContainedObjectsIterator
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
DelegatedUndoStackAttribute(NamedObj container,
java.lang.String name,
UndoStackAttribute oldAttribute) |
Modifier and Type | Method and Description |
---|---|
void |
mergeTopTwo()
Merge the top two undo entries into a single action, unless
we are in either a redo or an undo, in which case the merge
happens automatically and need not be explicitly requested
by the client.
|
void |
push(UndoAction action)
Push an action to the undo stack, or if we are executing an undo,
onto the redo stack.
|
void |
redo()
Remove the top redo action and execute it.
|
void |
undo()
Remove the top undo action and execute it.
|
getUndoInfo
setContainer
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
public DelegatedUndoStackAttribute(NamedObj container, java.lang.String name, UndoStackAttribute oldAttribute) throws IllegalActionException, NameDuplicationException
public void mergeTopTwo()
UndoStackAttribute
mergeTopTwo
in class UndoStackAttribute
public void push(UndoAction action)
UndoStackAttribute
push
in class UndoStackAttribute
action
- The undo action.public void redo() throws java.lang.Exception
UndoStackAttribute
redo
in class UndoStackAttribute
java.lang.Exception
- If something goes wrong.public void undo() throws java.lang.Exception
UndoStackAttribute
undo
in class UndoStackAttribute
java.lang.Exception
- If something goes wrong.