swingwtx.swing.undo
Class StateEdit

java.lang.Object
  extended byswingwtx.swing.undo.AbstractUndoableEdit
      extended byswingwtx.swing.undo.StateEdit
All Implemented Interfaces:
UndoableEdit

public class StateEdit
extends AbstractUndoableEdit

StateEdit


Field Summary
protected  StateEditable object
           
protected  java.util.Hashtable postState
           
protected  java.util.Hashtable preState
          Track before/after values
protected  java.lang.String undoRedoName
           
 
Fields inherited from class swingwtx.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
StateEdit(StateEditable stateEditable)
           
StateEdit(StateEditable stateEditable, java.lang.String undoRedoName)
           
 
Method Summary
 void end()
           
 java.lang.String getPresentationName()
           
protected  void init(StateEditable stateEditable, java.lang.String undoRedoName)
           
 void redo()
           
protected  void removeRedundantState()
          Called by end() to clean up duplicate and unnecessary key/values
 void undo()
           
 
Methods inherited from class swingwtx.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

object

protected StateEditable object

preState

protected java.util.Hashtable preState
Track before/after values


postState

protected java.util.Hashtable postState

undoRedoName

protected java.lang.String undoRedoName
Constructor Detail

StateEdit

public StateEdit(StateEditable stateEditable)

StateEdit

public StateEdit(StateEditable stateEditable,
                 java.lang.String undoRedoName)
Method Detail

getPresentationName

public java.lang.String getPresentationName()
Specified by:
getPresentationName in interface UndoableEdit
Overrides:
getPresentationName in class AbstractUndoableEdit

init

protected void init(StateEditable stateEditable,
                    java.lang.String undoRedoName)

undo

public void undo()
Specified by:
undo in interface UndoableEdit
Overrides:
undo in class AbstractUndoableEdit

redo

public void redo()
Specified by:
redo in interface UndoableEdit
Overrides:
redo in class AbstractUndoableEdit

end

public void end()

removeRedundantState

protected void removeRedundantState()
Called by end() to clean up duplicate and unnecessary key/values