Package dk.gtz.graphedit.util
Interface IObservableUndoSystem
- All Superinterfaces:
dk.yalibs.yaundo.IUndoSystem
- All Known Implementing Classes:
ObservableStackUndoSystem,ObservableTreeUndoSystem
public interface IObservableUndoSystem
extends dk.yalibs.yaundo.IUndoSystem
Interface for an undo system where the
Undoable entries are observable-
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(javafx.beans.value.ChangeListener<dk.yalibs.yaundo.Undoable> listener) Add a listener for when the currentUndoablechangesjavafx.beans.value.ObservableValue<dk.yalibs.yaundo.Undoable>Get the currentUndoableobservable valuedefault List<ObservableUndoable>Get a list ofObservableUndoablethat represent the undo history, which contains a string representation for pretty printing.voidgotoAction(dk.yalibs.yaundo.Undoable action) Go to a specificUndoableaction.voidremoveListener(javafx.beans.value.ChangeListener<dk.yalibs.yaundo.Undoable> listener) Remove a listener for when the currentUndoablechangesMethods inherited from interface dk.yalibs.yaundo.IUndoSystem
getCurrentAction, getHistory, push, redo, undo
-
Method Details
-
getCurrentUndoableProperty
javafx.beans.value.ObservableValue<dk.yalibs.yaundo.Undoable> getCurrentUndoableProperty()Get the currentUndoableobservable value- Returns:
- The current undoable
-
getStringRepresentation
Get a list ofObservableUndoablethat represent the undo history, which contains a string representation for pretty printing.- Returns:
- A list of
ObservableUndoable
-
addListener
void addListener(javafx.beans.value.ChangeListener<dk.yalibs.yaundo.Undoable> listener) Add a listener for when the currentUndoablechanges- Parameters:
listener- The listener to add
-
removeListener
void removeListener(javafx.beans.value.ChangeListener<dk.yalibs.yaundo.Undoable> listener) Remove a listener for when the currentUndoablechanges- Parameters:
listener- The listener to remove
-
gotoAction
void gotoAction(dk.yalibs.yaundo.Undoable action) Go to a specificUndoableaction. Note that this may trigger many change events.- Parameters:
action- The action to go to
-