harmonic.mz.undo
Class FieldUndo

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

public class FieldUndo
extends UndoRecord

Subclasses UndoRecord to restore state of the main value of any ModelNode. Construct a FieldUndo for a field BEFORE changing the field!


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
FieldUndo(FunctionStarter a, ModelNode field)
          Construct field undo for the specified field, changed by specified action.
FieldUndo(ModelNode field)
          Construct field undo for the specified field.
FieldUndo(java.lang.String name, ModelNode field)
          Construct field undo for specified field and name.
FieldUndo(java.lang.String name, ModelNode[] _fields)
          Construct field undo for specified fields and name.
FieldUndo(java.lang.String name, java.util.Vector _fields)
          Construct field undo for specified fields and name.
 
Method Summary
 void addF(ModelNode field)
          Add a field to keep in this undo record.
 UndoRecord makeRedo()
          Makes FieldUndo to do the redo.
 void undo()
          Does the undo by using ModelNode.set() to set the changed node to a copy taken by this FieldUndo at the time of the undo.
 
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, purgeFinal, 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

FieldUndo

public FieldUndo(ModelNode field)
Construct field undo for the specified field. Name will be the field's name


FieldUndo

public FieldUndo(FunctionStarter a,
                 ModelNode field)
Construct field undo for the specified field, changed by specified action.


FieldUndo

public FieldUndo(java.lang.String name,
                 ModelNode field)
Construct field undo for specified field and name.


FieldUndo

public FieldUndo(java.lang.String name,
                 java.util.Vector _fields)
Construct field undo for specified fields and name.


FieldUndo

public FieldUndo(java.lang.String name,
                 ModelNode[] _fields)
Construct field undo for specified fields and name.

Method Detail

addF

public void addF(ModelNode field)
Add a field to keep in this undo record.


makeRedo

public UndoRecord makeRedo()
Makes FieldUndo to do the redo.

Overrides:
makeRedo in class UndoRecord

undo

public void undo()
Does the undo by using ModelNode.set() to set the changed node to a copy taken by this FieldUndo at the time of the undo.

Overrides:
undo in class UndoRecord