Package org.fxmisc.undo
Interface UndoManager<C>
- All Known Implementing Classes:
MultiChangeUndoManagerImpl,UndoManagerImpl
public interface UndoManager<C>
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.value.ObservableBooleanValueIndicates whether this UndoManager's current position within its history is the same as the last marked position.org.reactfx.value.Val<C> Gives a peek at the change that will be redone byredo().org.reactfx.value.Val<C> Gives a peek at the change that will be undone byundo().javafx.beans.value.ObservableBooleanValueIndicates whether this undo manager is currently performing undo or redo action.org.reactfx.value.Val<Boolean> Indicates whether there is a change that can be redone.org.reactfx.value.Val<Boolean> Indicates whether there is a change that can be undone. -
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents a position in UndoManager's history. -
Method Summary
Modifier and TypeMethodDescriptionjavafx.beans.value.ObservableBooleanValueIndicates whether this UndoManager's current position within its history is the same as the last marked position.voidclose()Stops observing change events.voidForgets all changes prior to the current position in the history.Returns the current position within this UndoManager's history.default CGets the value of thenextRedoproperty.default CGets the value of thenextUndoproperty.booleanbooleanbooleanbooleandefault voidmark()Sets this UndoManager's mark to the current position.org.reactfx.value.Val<C> Gives a peek at the change that will be redone byredo().org.reactfx.value.Val<C> Gives a peek at the change that will be undone byundo().javafx.beans.value.ObservableBooleanValueIndicates whether this undo manager is currently performing undo or redo action.voidPrevents 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<Boolean> 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<Boolean> Indicates whether there is a change that can be undone.
-
Property Details
-
undoAvailable
org.reactfx.value.Val<Boolean> undoAvailablePropertyIndicates whether there is a change that can be undone.- See Also:
-
nextUndo
org.reactfx.value.Val<C> nextUndoPropertyGives a peek at the change that will be undone byundo().- See Also:
-
nextRedo
org.reactfx.value.Val<C> nextRedoPropertyGives a peek at the change that will be redone byredo().- See Also:
-
redoAvailable
org.reactfx.value.Val<Boolean> redoAvailablePropertyIndicates whether there is a change that can be redone.- See Also:
-
performingAction
javafx.beans.value.ObservableBooleanValue performingActionPropertyIndicates whether this undo manager is currently performing undo or redo action.- See Also:
-
atMarkedPosition
javafx.beans.value.ObservableBooleanValue atMarkedPositionPropertyIndicates whether this UndoManager's current position within its history is the same as the last marked position.- See Also:
-
-
Method Details
-
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<Boolean> undoAvailableProperty()Indicates whether there is a change that can be undone.- Returns:
- the
undoAvailableproperty
-
isUndoAvailable
boolean isUndoAvailable() -
nextUndoProperty
org.reactfx.value.Val<C> nextUndoProperty()Gives a peek at the change that will be undone byundo().- Returns:
- the
nextUndoproperty - See Also:
-
getNextUndo
Gets the value of thenextUndoproperty.- Property description:
- Gives a peek at the change that will be undone by
undo(). - Returns:
- the value of the
nextUndoproperty - See Also:
-
nextRedoProperty
org.reactfx.value.Val<C> nextRedoProperty()Gives a peek at the change that will be redone byredo().- Returns:
- the
nextRedoproperty - See Also:
-
getNextRedo
Gets the value of thenextRedoproperty.- Property description:
- Gives a peek at the change that will be redone by
redo(). - Returns:
- the value of the
nextRedoproperty - See Also:
-
redoAvailableProperty
org.reactfx.value.Val<Boolean> redoAvailableProperty()Indicates whether there is a change that can be redone.- Returns:
- the
redoAvailableproperty
-
isRedoAvailable
boolean isRedoAvailable() -
performingActionProperty
javafx.beans.value.ObservableBooleanValue performingActionProperty()Indicates whether this undo manager is currently performing undo or redo action.- Returns:
- the
performingActionproperty
-
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.- Returns:
- the
atMarkedPositionproperty
-
isAtMarkedPosition
boolean isAtMarkedPosition() -
close
void close()Stops observing change events.
-