Package snap.props
Class UndoSet
java.lang.Object
snap.props.UndoSet
This class represents a single undo but holds a list of PropChanges.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPropChange
(PropChange anEvent) Adds a property change.int
Returns the number of changes.Returns the selection to be set if undo is executed.Returns the full title of this undo when used for redo.Returns the full title of this undo when used for undo.Returns the selection to be set if redo is executed.Returns the selection to be set if undo is executed.Returns the undo title.boolean
isEmpty()
Returns whether this set has no changes.boolean
mergePropChange
(PropChange newPC) Tries to merge property change.void
redo()
Executes redo for this event.void
reset()
Resets this undo event for reuse.toString()
Standard toString implementation.void
undo()
Executes undo for this event.
-
Field Details
-
_undoTitle
-
_undoSelection
-
_redoSelection
-
_closed
protected boolean _closed
-
-
Constructor Details
-
UndoSet
public UndoSet()Creates a new empty undo set.
-
-
Method Details
-
getUndoTitle
Returns the undo title. -
getFullUndoTitle
Returns the full title of this undo when used for undo. -
getFullRedoTitle
Returns the full title of this undo when used for redo. -
isEmpty
public boolean isEmpty()Returns whether this set has no changes. -
getChangeCount
public int getChangeCount()Returns the number of changes. -
getChanges
Returns the selection to be set if undo is executed. -
getUndoSelection
Returns the selection to be set if undo is executed. -
getRedoSelection
Returns the selection to be set if redo is executed. -
mergePropChange
Tries to merge property change. -
addPropChange
Adds a property change. -
undo
public void undo()Executes undo for this event. -
redo
public void redo()Executes redo for this event. -
reset
public void reset()Resets this undo event for reuse. -
toString
Standard toString implementation.
-