Top Inners Methods
org.fxmisc.undo

public Interface UndoManager<C>

Known Direct Implementers
org.fxmisc.undo.impl.UndoManagerImpl
Imports
javafx.beans.value.ObservableBooleanValue, org.reactfx.value.Val

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
UndoManager.UndoPosition

Represents a position in UndoManager's history.

Method Summary

Modifier and TypeMethod and Description
public ObservableBooleanValue
atMarkedPositionProperty()

Indicates whether this UndoManager's current position within its history is the same as the last marked position.

public void
close()

Stops observing change events.

public void
forgetHistory()

Forgets all changes prior to the current position in the history.

public UndoManager.UndoPosition
getCurrentPosition()

Returns the current position within this UndoManager's history.

public default C
public default C
public boolean
public boolean
public boolean
public boolean
public default void
mark()

Sets this UndoManager's mark to the current position.

public Val<C>
nextRedoProperty()

Gives a peek at the change that will be redone by redo().

public Val<C>
nextUndoProperty()

Gives a peek at the change that will be undone by undo().

public ObservableBooleanValue
performingActionProperty()

Indicates whether this undo manager is currently performing undo or redo action.

public void
preventMerge()

Prevents the next change from being merged with the latest one.

public boolean

Returns:

true if a change was redone, false otherwise.
redo
()

Redo previously undone change, if there is any change to redo.

public Val<Boolean>
redoAvailableProperty()

Indicates whether there is a change that can be redone.

public boolean

Returns:

true if a change was undone, false otherwise.
undo
()

Undo the most recent change, if there is any change to undo.

public Val<Boolean>
undoAvailableProperty()

Indicates whether there is a change that can be undone.

Method Detail

atMarkedPositionPropertyback to summary
public ObservableBooleanValue atMarkedPositionProperty()

Indicates whether this UndoManager's current position within its history is the same as the last marked position.

closeback to summary
public void close()

Stops observing change events.

forgetHistoryback to summary
public void forgetHistory()

Forgets all changes prior to the current position in the history.

getCurrentPositionback to summary
public UndoManager.UndoPosition getCurrentPosition()

Returns the current position within this UndoManager's history.

getNextRedoback to summary
public default C getNextRedo()
getNextUndoback to summary
public default C getNextUndo()
isAtMarkedPositionback to summary
public boolean isAtMarkedPosition()
isPerformingActionback to summary
public boolean isPerformingAction()
isRedoAvailableback to summary
public boolean isRedoAvailable()
isUndoAvailableback to summary
public boolean isUndoAvailable()
markback to summary
public default void mark()

Sets this UndoManager's mark to the current position. This method is a convenient shortcut for getCurrentPosition().mark().

nextRedoPropertyback to summary
public Val<C> nextRedoProperty()

Gives a peek at the change that will be redone by redo().

nextUndoPropertyback to summary
public Val<C> nextUndoProperty()

Gives a peek at the change that will be undone by undo().

performingActionPropertyback to summary
public ObservableBooleanValue performingActionProperty()

Indicates whether this undo manager is currently performing undo or redo action.

preventMergeback to summary
public void preventMerge()

Prevents the next change from being merged with the latest one.

redoback to summary
public boolean redo()

Redo previously undone change, if there is any change to redo.

Returns:boolean

true if a change was redone, false otherwise.

redoAvailablePropertyback to summary
public Val<Boolean> redoAvailableProperty()

Indicates whether there is a change that can be redone.

undoback to summary
public boolean undo()

Undo the most recent change, if there is any change to undo.

Returns:boolean

true if a change was undone, false otherwise.

undoAvailablePropertyback to summary
public Val<Boolean> undoAvailableProperty()

Indicates whether there is a change that can be undone.

org.fxmisc.undo back to summary

public Interface UndoManager.UndoPosition

Known Direct Implementers
org.fxmisc.undo.impl.UndoManagerImpl.UndoPositionImpl

Represents a position in UndoManager's history.

Method Summary

Modifier and TypeMethod and Description
public boolean
isValid()

Checks whether this history position is still valid.

public void
mark()

Sets the mark of the underlying UndoManager at this position.

Method Detail

isValidback to summary
public boolean isValid()

Checks whether this history position is still valid. A position becomes invalid when

  • the change immediately preceding the position is undone and then discarded due to another incoming change; or
  • the change immediately following the position is forgotten due to history size limit.
markback to summary
public void mark()

Sets the mark of the underlying UndoManager at this position. The mark is set whether or not this position is valid. It is OK for an UndoManager to be marked at an invalid position.