C
- the type of change to undo/redopublic class UndoManagerImpl<C> extends java.lang.Object implements UndoManager<C>
UndoManager
for single changes. For multiple changes, see
MultiChangeUndoManagerImpl
.Type | Property and Description |
---|---|
javafx.beans.value.ObservableBooleanValue |
atMarkedPosition
Indicates whether this UndoManager's current position within
its history is the same as the last marked position.
|
Val<C> |
nextRedo
Gives a peek at the change that will be redone by
UndoManager.redo() . |
Val<C> |
nextUndo
Gives a peek at the change that will be undone by
UndoManager.undo() . |
javafx.beans.value.ObservableBooleanValue |
performingAction
Indicates whether this undo manager is currently performing undo or redo
action.
|
Val<java.lang.Boolean> |
redoAvailable
Indicates whether there is a change that can be redone.
|
Val<java.lang.Boolean> |
undoAvailable
Indicates whether there is a change that can be undone.
|
UndoManager.UndoPosition
Constructor and Description |
---|
UndoManagerImpl(ChangeQueue<C> queue,
java.util.function.Function<? super C,? extends C> invert,
java.util.function.Consumer<C> apply,
java.util.function.BiFunction<C,C,java.util.Optional<C>> merge,
java.util.function.Predicate<C> isIdentity,
EventStream<C> changeSource) |
UndoManagerImpl(ChangeQueue<C> queue,
java.util.function.Function<? super C,? extends C> invert,
java.util.function.Consumer<C> apply,
java.util.function.BiFunction<C,C,java.util.Optional<C>> merge,
java.util.function.Predicate<C> isIdentity,
EventStream<C> changeSource,
java.time.Duration preventMergeDelay) |
Modifier and Type | Method and Description |
---|---|
javafx.beans.value.ObservableBooleanValue |
atMarkedPositionProperty()
Indicates whether this UndoManager's current position within
its history is the same as the last marked position.
|
void |
close()
Stops observing change events.
|
void |
forgetHistory()
Forgets all changes prior to the current position in the history.
|
UndoManager.UndoPosition |
getCurrentPosition()
Returns the current position within this UndoManager's history.
|
boolean |
isAtMarkedPosition() |
boolean |
isPerformingAction() |
boolean |
isRedoAvailable() |
boolean |
isUndoAvailable() |
Val<C> |
nextRedoProperty()
Gives a peek at the change that will be redone by
UndoManager.redo() . |
Val<C> |
nextUndoProperty()
Gives a peek at the change that will be undone by
UndoManager.undo() . |
javafx.beans.value.ObservableBooleanValue |
performingActionProperty()
Indicates whether this undo manager is currently performing undo or redo
action.
|
void |
preventMerge()
Prevents the next change from being merged with the latest one.
|
boolean |
redo()
Redo previously undone change, if there is any change to redo.
|
Val<java.lang.Boolean> |
redoAvailableProperty()
Indicates whether there is a change that can be redone.
|
boolean |
undo()
Undo the most recent change, if there is any change to undo.
|
Val<java.lang.Boolean> |
undoAvailableProperty()
Indicates whether there is a change that can be undone.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNextRedo, getNextUndo, mark
public Val<C> nextUndoProperty
nextUndoProperty
in interface UndoManager<C>
public Val<C> nextRedoProperty
nextRedoProperty
in interface UndoManager<C>
public Val<java.lang.Boolean> undoAvailableProperty
undoAvailableProperty
in interface UndoManager<C>
public Val<java.lang.Boolean> redoAvailableProperty
redoAvailableProperty
in interface UndoManager<C>
public javafx.beans.value.ObservableBooleanValue performingActionProperty
performingActionProperty
in interface UndoManager<C>
public javafx.beans.value.ObservableBooleanValue atMarkedPositionProperty
atMarkedPositionProperty
in interface UndoManager<C>
public UndoManagerImpl(ChangeQueue<C> queue, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, EventStream<C> changeSource)
public UndoManagerImpl(ChangeQueue<C> queue, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, EventStream<C> changeSource, java.time.Duration preventMergeDelay)
public void close()
UndoManager
close
in interface UndoManager<C>
public boolean undo()
UndoManager
undo
in interface UndoManager<C>
true
if a change was undone, false
otherwise.public boolean redo()
UndoManager
redo
in interface UndoManager<C>
true
if a change was redone, false
otherwise.public Val<C> nextUndoProperty()
UndoManager
UndoManager.undo()
.nextUndoProperty
in interface UndoManager<C>
public Val<C> nextRedoProperty()
UndoManager
UndoManager.redo()
.nextRedoProperty
in interface UndoManager<C>
public boolean isUndoAvailable()
isUndoAvailable
in interface UndoManager<C>
public Val<java.lang.Boolean> undoAvailableProperty()
UndoManager
undoAvailableProperty
in interface UndoManager<C>
public boolean isRedoAvailable()
isRedoAvailable
in interface UndoManager<C>
public Val<java.lang.Boolean> redoAvailableProperty()
UndoManager
redoAvailableProperty
in interface UndoManager<C>
public boolean isPerformingAction()
isPerformingAction
in interface UndoManager<C>
public javafx.beans.value.ObservableBooleanValue performingActionProperty()
UndoManager
performingActionProperty
in interface UndoManager<C>
public boolean isAtMarkedPosition()
isAtMarkedPosition
in interface UndoManager<C>
public javafx.beans.value.ObservableBooleanValue atMarkedPositionProperty()
UndoManager
atMarkedPositionProperty
in interface UndoManager<C>
public UndoManager.UndoPosition getCurrentPosition()
UndoManager
getCurrentPosition
in interface UndoManager<C>
public void preventMerge()
UndoManager
preventMerge
in interface UndoManager<C>
public void forgetHistory()
UndoManager
forgetHistory
in interface UndoManager<C>