public class RMUndoer extends AbstractChangeable
Modifier and Type | Class and Description |
---|---|
static interface |
RMUndoer.Selection
An interface for undo/redo selection.
|
changeEvent, listenerList
Constructor and Description |
---|
RMUndoer()
Creates a new undoer.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChange(java.beans.PropertyChangeEvent anEvent)
Adds a property change.
|
void |
disable()
Disables undoer so it can receive new changes.
|
void |
enable()
Enables undoer.
|
RMUndoSet |
getActiveUndoSet()
Returns the active undo set.
|
java.lang.Object |
getRedoSelection()
Returns the list of objects that should be selected after current undo is redone.
|
RMUndoSet |
getRedoSetLast()
Returns the last redo.
|
java.util.List<RMUndoSet> |
getRedoSets()
Returns the list of redo sets.
|
java.lang.Object |
getUndoSelection()
Returns the list of objects that should be selected after current undo is fired.
|
RMUndoSet |
getUndoSetLast()
Returns the last undo.
|
java.util.List<RMUndoSet> |
getUndoSets()
Returns the list of undo sets.
|
boolean |
hasRedos()
Returns whether undoer has Redo changes stored away.
|
boolean |
hasUndos()
Returns whether undoer has Undo changes stored away.
|
boolean |
isBenignChange(java.lang.String aString)
Returns whether a given change doesn't really effect signficant state change.
|
boolean |
isDuplicate(java.lang.String aTitle,
RMObject anObj)
Returns whether given title is title of last undo.
|
boolean |
isEnabled()
Returns whether undoer is disabled.
|
RMUndoSet |
redo()
Pops last redo set off stack and has it update all changed objects it contains.
|
void |
reset()
Resets the undoer to its initial state (good to do when a document is saved).
|
void |
saveChanges()
Pushes current undo record on the stack and opens new one.
|
void |
setActiveUndoSet(RMUndoSet anUndoSet)
Sets the active event (presumably from undo sets list).
|
void |
setRedoSelection(java.lang.Object aList)
Sets the list of objects that should be selected after current undo is redone.
|
void |
setUndoSelection(java.lang.Object aList)
Sets the list of objects that should be selected after current undo is fired.
|
void |
setUndoTitle(java.lang.String aString)
Sets the title of the current undo.
|
java.lang.String |
toString()
Standard toString implementation.
|
RMUndoSet |
undo()
Pops last undo set off stack an has it update all changed objects it contains.
|
addChangeListener, fireStateChanged, getChangeListeners, removeChangeListener
public RMUndoSet getActiveUndoSet()
public void setActiveUndoSet(RMUndoSet anUndoSet)
public void setUndoTitle(java.lang.String aString)
public java.util.List<RMUndoSet> getUndoSets()
public java.util.List<RMUndoSet> getRedoSets()
public RMUndoSet getUndoSetLast()
public RMUndoSet getRedoSetLast()
public java.lang.Object getUndoSelection()
public void setUndoSelection(java.lang.Object aList)
public java.lang.Object getRedoSelection()
public void setRedoSelection(java.lang.Object aList)
public void addPropertyChange(java.beans.PropertyChangeEvent anEvent)
public void saveChanges()
public RMUndoSet undo()
public RMUndoSet redo()
public boolean isEnabled()
public void disable()
public void enable()
public void reset()
public boolean isBenignChange(java.lang.String aString)
public boolean hasUndos()
public boolean hasRedos()
public boolean isDuplicate(java.lang.String aTitle, RMObject anObj)
public java.lang.String toString()
toString
in class java.lang.Object