Package snap.props

Class UndoSet

java.lang.Object
snap.props.UndoSet

public class UndoSet extends Object
This class represents a single undo but holds a list of PropChanges.
  • Field Details

    • _undoTitle

      protected String _undoTitle
    • _undoSelection

      protected Object _undoSelection
    • _redoSelection

      protected Object _redoSelection
    • _closed

      protected boolean _closed
  • Constructor Details

    • UndoSet

      public UndoSet()
      Creates a new empty undo set.
  • Method Details

    • getUndoTitle

      public String getUndoTitle()
      Returns the undo title.
    • getFullUndoTitle

      public String getFullUndoTitle()
      Returns the full title of this undo when used for undo.
    • getFullRedoTitle

      public String 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

      public List<PropChange> getChanges()
      Returns the selection to be set if undo is executed.
    • getUndoSelection

      public Object getUndoSelection()
      Returns the selection to be set if undo is executed.
    • getRedoSelection

      public Object getRedoSelection()
      Returns the selection to be set if redo is executed.
    • mergePropChange

      public boolean mergePropChange(PropChange newPC)
      Tries to merge property change.
    • addPropChange

      public void addPropChange(PropChange anEvent)
      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

      public String toString()
      Standard toString implementation.
      Overrides:
      toString in class Object