public abstract class StringUndoStackBase extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
StringUndoStackBase(java.lang.String initialString)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canRedo()
Returns whether redo is possible.
|
boolean |
canUndo()
Returns whether undo is possible.
|
protected int |
debugGetSize()
Prints the amount of memory currently used by this stack.
|
void |
doSave()
Mark the current position as saved (affects dirty calculation).
|
protected abstract void |
fireStackChanged()
Something about this stack has changed.
|
protected void |
insertNewVersion(java.lang.String s)
Inserts a new version of the model (as a string) into this stack.
|
boolean |
isDirty()
Returns whether something changed compared to the last safe.
|
protected abstract java.lang.String |
join(java.util.List<java.lang.String> parts)
Joins the parts created by
split(String) . |
void |
redo()
Performs one redo step.
|
protected abstract void |
setModelFromString(java.lang.String s)
This should write back the stack content to the model.
|
protected abstract java.util.List<java.lang.String> |
split(java.lang.String s)
Splits the given string (as reported from the implementing class) into
suitable parts used for diffing (lines, words, tokens, etc.).
|
void |
undo()
Performs one undo step.
|
protected StringUndoStackBase(java.lang.String initialString)
public boolean canUndo()
public void undo()
public boolean canRedo()
public void redo()
public boolean isDirty()
public void doSave()
protected void insertNewVersion(java.lang.String s)
protected abstract java.util.List<java.lang.String> split(java.lang.String s)
protected abstract java.lang.String join(java.util.List<java.lang.String> parts)
split(String)
.protected abstract void setModelFromString(java.lang.String s)
protected abstract void fireStackChanged()
protected int debugGetSize()