harmonic.mz.undo
Class TreeUndo

java.lang.Object
  |
  +--harmonic.mz.data.ModelNode
        |
        +--harmonic.mz.undo.UndoRecord
              |
              +--harmonic.mz.undo.TreeUndo
All Implemented Interfaces:
java.awt.event.ActionListener, DataNode, Documentable, java.util.EventListener, Interpolater, harmonic.meshGeom.math.MarkableObject, NodeListener

public class TreeUndo
extends UndoRecord

Subclass of UndoRecord that stores how tree nodes are parented in database. Undoing will put the node back in its old location. Used for additons, removeals, and moves.


Field Summary
 
Fields inherited from class harmonic.mz.undo.UndoRecord
undo
 
Fields inherited from class harmonic.mz.data.ModelNode
_fileRoot_, _thread_, ATTRIB_CONTROL_WIDGET, ATTRIB_LISTABLE, ATTRIB_PRESENTABLE, ATTRIB_PRIVATE, ATTRIB_REMOVEABLE, ATTRIB_RENAMEABLE, ATTRIB_SHOW_CONTEXT_MENU, ATTRIB_TYPE_FILTER, ATTRIB_USERGROUP, ATTRIB_VALUE_GROUP, ATTRIB_VE_LISTENER, bCustomCS, bDebug, bValid, name
 
Constructor Summary
TreeUndo(DataNode node)
          Constructs a TreeUndo to store one node's state
TreeUndo(FunctionStarter action, DataNode node)
          Constructs a TreeUndo to store one nodes state, named to follow given user action.
TreeUndo(FunctionStarter action, DataNode[] nodes)
          Constructs a TreeUndo to store set of nodes state, named to follow given user action.
TreeUndo(java.lang.String name, DataNode node)
          Constructs a TreeUndo to store one nodes state, with the given name.
TreeUndo(java.lang.String name, DataNode[] nodes)
          Constructs a TreeUndo to store a set of nodes state, with the given name.
 
Method Summary
 void addNode(ModelNode p)
          Adds a node to this undo.
 UndoRecord makeRedo()
          Creates a TreeUndo for doing the redo.
 void purgeFinal()
          If undoes a delete, calls ModelNode.purgeFinal() for this nodes undo records.
 void undo()
          Does the undo by reparenting the nodes of concern back to the the nodes they were under when the TreeUndo was created.
 
Methods inherited from class harmonic.mz.data.ModelNode
actionPerformed, addAll, addAlphaed, addField, addField, addField, addFields, addNetworkInput, addNetworkOutput, addNode, addNodeListener, addNodeListener, addNodes, addNodes, addToCurrent, addToGlobals, addToNetworkEditor, addToTemps, addWithUndo, allFieldsAreFinal, applyDataTransfer, areFieldsValid, assignFromMetaFields, assignFromXMLAttributes, assignFromXMLString, assignToMetaFields, assignToXMLAttributes, assignToXMLString, at, bind, canSelect, castSelection, checkFileRead, checkNetworkInput, childCount, clean, clearAttrib, clearNotified, compare, copyFrom, createControlWidget, createCopy, createXMLElement, deepCopy, defeatNodeEvents, disableEvents, enableEvents, expectedValidationTime, fileRoot, finalize, findFieldElement, findNode, fromXMLNodes, getAttrib, getBound, getCatagory, getControlWidget, getCurrentNames, getDataTransfer, getDataTransferTypes, getDeleted, getDirectInputs, getDirectOutputs, getEffectors, getEntryListener, getErrorState, getFilterType, getFullName, getHandles, getInstanceURL, getInterpolater, getIsLeaf, getListable, getMark, getMetaFields, getName, getNodeChildren_V, getNodeChildren, getNodeID, getNodeParent, getObjectRep, getPresentable, getPrivate, getReferencePoolName, getRemoteOwner, getRemoveable, getRenameable, getSaveable, getSavedChildren, getSelect, getSeparateDirectInputs, getSeparateDirectOutputs, getSequenced, getSerialNo, getTags, getTentativeSelect, getTransformable, getTransformableParent, getTransient, getTreeName, getTypeImage, getTypeURL, getUnfoldedChildren, getUpdateTime, getUserGroup, getValidates, getValue, getXMLNodes, hasDependants, hasExternalRef, hashKey, hasValidationLock, hideControlWidget, indexOf, initControlWidget, insertNode, interpolate_Linear, interpolate_Quadratic, invalidate, isField, isFinal, isInSubtree, isInTree, isLinked, isNotified, isPurged, isSet, isTemporary, isValid, linkedTo, linksChildren, makeContextMenu, makeFixed, makePrototype, makeReferenced, makeUnreferenced, makeVisibleInGUI, markNotified, mayValidate, nodeChanged, notifyListeners, postAssignFromXMLElement, preAssignToXMLElement, printChildren, printTags, printTree, printTree, purge, pythonString, remove, removeAll, removeAll, removeHandles, removeNetworkInput, removeNetworkOutput, removeNode, removeNode, removeNode, removeNodeListener, replace, selfNodeChanged, set, setActualName, setAttrib, setBound, setCatagory, setChildrenExcept, setCoordSystem, setCurrentControlWidget, setCurrentNames, setDeleted, setEntryListener, setErrorState, setFromPrototype, setIsField, setIsLeaf, setIsSet, setListable, setMark, setMetaFields, setName, setNodeParent, setPresentable, setPrivate, setRemoteOwner, setRemoveable, setRenameable, setSaveable, setSelect, setSelect, setSequenced, setSerialNo, setTentativeSelect, setTentativeSelect, setToLink, setTransient, setTransientChildren, setUpdateTime, setUserGroup, setValidates, setValidationLock, setValue, setValueGroup, showControlWidget, showControlWidget, showControlWidget, showHandles, startRename, tag, toString, unlinkListeners, unmarkNotified, untag, updateBindable, valChanged, valChanged, validate, valueString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeUndo

public TreeUndo(DataNode node)
Constructs a TreeUndo to store one node's state


TreeUndo

public TreeUndo(FunctionStarter action,
                DataNode node)
Constructs a TreeUndo to store one nodes state, named to follow given user action.


TreeUndo

public TreeUndo(FunctionStarter action,
                DataNode[] nodes)
Constructs a TreeUndo to store set of nodes state, named to follow given user action.


TreeUndo

public TreeUndo(java.lang.String name,
                DataNode node)
Constructs a TreeUndo to store one nodes state, with the given name.


TreeUndo

public TreeUndo(java.lang.String name,
                DataNode[] nodes)
Constructs a TreeUndo to store a set of nodes state, with the given name.

Method Detail

addNode

public void addNode(ModelNode p)
Adds a node to this undo.


undo

public void undo()
Does the undo by reparenting the nodes of concern back to the the nodes they were under when the TreeUndo was created.

Overrides:
undo in class UndoRecord

makeRedo

public UndoRecord makeRedo()
Creates a TreeUndo for doing the redo.

Overrides:
makeRedo in class UndoRecord

purgeFinal

public void purgeFinal()
If undoes a delete, calls ModelNode.purgeFinal() for this nodes undo records.

Specified by:
purgeFinal in interface DataNode
Overrides:
purgeFinal in class ModelNode