public class RMUndoer extends RMObject
Modifier and Type | Class and Description |
---|---|
static class |
RMUndoer.RMUndoEvent
This class reprents a distinct "undoable event".
|
Constructor and Description |
---|
RMUndoer()
Creates a new undoer.
|
Modifier and Type | Method and Description |
---|---|
void |
addDirtyObject(RMObject anObj)
Adds the given object to the current undo record.
|
java.util.List |
allUndos()
Returns all undos (including the current one, if changes are pending).
|
void |
disable()
Disables undoer so it can receive new changes.
|
void |
enable()
Enables undoer.
|
boolean |
getCoalesce()
Returns whether undoer coalesces changes.
|
int |
getDirtyObjectCount()
Returns the number of dirty objects in the current undo record.
|
int |
getDisabled()
Returns whether undoer is disabled.
|
RMUndoer.RMUndoEvent |
getRecentUndo()
Returns most recent undo event.
|
RMUndoer.RMUndoEvent |
getRedoEvent()
Returns the next redo event.
|
RMUndoer.RMUndoEvent |
getRedoLast()
Returns the last redo.
|
java.util.List |
getRedoSelectedObjects()
Returns the list of objects that should be selected after current undo is redone.
|
RMUndoer.RMUndoEvent |
getUndoEvent()
Returns the next undo event.
|
RMUndoer.RMUndoEvent |
getUndoLast()
Returns the last undo.
|
java.util.List |
getUndoSelectedObjects()
Returns the list of objects that should be selected after current undo is fired.
|
boolean |
hasUndos()
Returns whether undoer has undoable 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.
|
void |
redo()
Pops last redo event off stack and has it update all changed objects it contains.
|
java.util.List |
redos()
Returns the list of redos.
|
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 |
setCoalesce(boolean aFlag)
Sets whether undoer coalesces changes.
|
void |
setDisabled(int aValue)
Sets whether undoer is disabled.
|
void |
setRedoSelectedObjects(java.util.List aList)
Sets the list of objects that should be selected after current undo is redone.
|
void |
setUndoSelectedObjects(java.util.List 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.
|
void |
undo()
Pops last undo event off stack an has it update all changed objects it contains.
|
java.util.List |
undos()
Returns the list of undos.
|
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
public int getDirtyObjectCount()
public void addDirtyObject(RMObject anObj)
public void saveChanges()
public void undo()
public void redo()
public void disable()
public void enable()
public int getDisabled()
public void setDisabled(int aValue)
public boolean getCoalesce()
public void setCoalesce(boolean aFlag)
public RMUndoer.RMUndoEvent getRecentUndo()
public void reset()
public boolean isBenignChange(java.lang.String aString)
public boolean hasUndos()
public RMUndoer.RMUndoEvent getUndoEvent()
public RMUndoer.RMUndoEvent getRedoEvent()
public void setUndoTitle(java.lang.String aString)
public java.util.List undos()
public java.util.List redos()
public RMUndoer.RMUndoEvent getUndoLast()
public RMUndoer.RMUndoEvent getRedoLast()
public java.util.List allUndos()
public java.util.List getUndoSelectedObjects()
public void setUndoSelectedObjects(java.util.List aList)
public java.util.List getRedoSelectedObjects()
public void setRedoSelectedObjects(java.util.List aList)
public boolean isDuplicate(java.lang.String aTitle, RMObject anObj)