eu.beesoft.gantt.undo
Class UndoStep

java.lang.Object
  extended by javax.swing.undo.AbstractUndoableEdit
      extended by javax.swing.undo.CompoundEdit
          extended by eu.beesoft.gantt.undo.UndoStep
All Implemented Interfaces:
java.io.Serializable, javax.swing.undo.UndoableEdit

public class UndoStep
extends javax.swing.undo.CompoundEdit

Represents one undo / redo step. Each object which can be changed in this step, should be registered in this instance via calling registerObject(Object) method.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.undo.CompoundEdit
edits
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
UndoStep()
          Creates a new instance of UndoStep.
 
Method Summary
 void end()
          Gets the post-edit state of the required objects and ends the edit.
 void registerObject(java.lang.Object object)
          Registers object to store / restore its state.
 
Methods inherited from class javax.swing.undo.CompoundEdit
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isInProgress, isSignificant, lastEdit, redo, toString, undo
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
replaceEdit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UndoStep

public UndoStep()
Creates a new instance of UndoStep.

Method Detail

registerObject

public void registerObject(java.lang.Object object)
Registers object to store / restore its state.

If given object does not implement interface StateEditable, the object is covered by StateEditableObject to make it eligibly for undo / redo operations.

Then is object registered and its pre-state is obtained.

Parameters:
object - - object to register

end

public void end()
Gets the post-edit state of the required objects and ends the edit.

Overrides:
end in class javax.swing.undo.CompoundEdit