Package org.fxmisc.undo
Interface UndoManager<C>
-
- All Known Implementing Classes:
MultiChangeUndoManagerImpl,UndoManagerImpl
public interface UndoManager<C>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceUndoManager.UndoPositionRepresents a position in UndoManager's history.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description javafx.beans.value.ObservableBooleanValueatMarkedPositionProperty()Indicates whether this UndoManager's current position within its history is the same as the last marked position.voidclose()Stops observing change events.voidforgetHistory()Forgets all changes prior to the current position in the history.UndoManager.UndoPositiongetCurrentPosition()Returns the current position within this UndoManager's history.default CgetNextRedo()default CgetNextUndo()booleanisAtMarkedPosition()booleanisPerformingAction()booleanisRedoAvailable()booleanisUndoAvailable()default voidmark()Sets this UndoManager's mark to the current position.org.reactfx.value.Val<C>nextRedoProperty()Gives a peek at the change that will be redone byredo().org.reactfx.value.Val<C>nextUndoProperty()Gives a peek at the change that will be undone byundo().javafx.beans.value.ObservableBooleanValueperformingActionProperty()Indicates whether this undo manager is currently performing undo or redo action.voidpreventMerge()Prevents the next change from being merged with the latest one.booleanredo()Redo previously undone change, if there is any change to redo.org.reactfx.value.Val<java.lang.Boolean>redoAvailableProperty()Indicates whether there is a change that can be redone.booleanundo()Undo the most recent change, if there is any change to undo.org.reactfx.value.Val<java.lang.Boolean>undoAvailableProperty()Indicates whether there is a change that can be undone.
-
-
-
Method Detail
-
undo
boolean undo()
Undo the most recent change, if there is any change to undo.- Returns:
trueif a change was undone,falseotherwise.
-
redo
boolean redo()
Redo previously undone change, if there is any change to redo.- Returns:
trueif a change was redone,falseotherwise.
-
undoAvailableProperty
org.reactfx.value.Val<java.lang.Boolean> undoAvailableProperty()
Indicates whether there is a change that can be undone.
-
isUndoAvailable
boolean isUndoAvailable()
-
nextUndoProperty
org.reactfx.value.Val<C> nextUndoProperty()
Gives a peek at the change that will be undone byundo().
-
getNextUndo
default C getNextUndo()
-
nextRedoProperty
org.reactfx.value.Val<C> nextRedoProperty()
Gives a peek at the change that will be redone byredo().
-
getNextRedo
default C getNextRedo()
-
redoAvailableProperty
org.reactfx.value.Val<java.lang.Boolean> redoAvailableProperty()
Indicates whether there is a change that can be redone.
-
isRedoAvailable
boolean isRedoAvailable()
-
performingActionProperty
javafx.beans.value.ObservableBooleanValue performingActionProperty()
Indicates whether this undo manager is currently performing undo or redo action.
-
isPerformingAction
boolean isPerformingAction()
-
preventMerge
void preventMerge()
Prevents the next change from being merged with the latest one.
-
forgetHistory
void forgetHistory()
Forgets all changes prior to the current position in the history.
-
getCurrentPosition
UndoManager.UndoPosition getCurrentPosition()
Returns the current position within this UndoManager's history.
-
mark
default void mark()
Sets this UndoManager's mark to the current position. This method is a convenient shortcut forgetCurrentPosition().mark().
-
atMarkedPositionProperty
javafx.beans.value.ObservableBooleanValue atMarkedPositionProperty()
Indicates whether this UndoManager's current position within its history is the same as the last marked position.
-
isAtMarkedPosition
boolean isAtMarkedPosition()
-
close
void close()
Stops observing change events.
-
-