Interface UndoManager<C>

All Known Implementing Classes:
MultiChangeUndoManagerImpl, UndoManagerImpl

public interface UndoManager<C>
  • Property Summary

    Properties
    Type
    Property
    Description
    javafx.beans.value.ObservableBooleanValue
    Indicates 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 by redo().
    org.reactfx.value.Val<C>
    Gives a peek at the change that will be undone by undo().
    javafx.beans.value.ObservableBooleanValue
    Indicates 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 Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Represents a position in UndoManager's history.
  • Method Summary

    Modifier and Type
    Method
    Description
    javafx.beans.value.ObservableBooleanValue
    Indicates whether this UndoManager's current position within its history is the same as the last marked position.
    void
    Stops observing change events.
    void
    Forgets all changes prior to the current position in the history.
    Returns the current position within this UndoManager's history.
    default C
    Gets the value of the nextRedo property.
    default C
    Gets the value of the nextUndo property.
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    default void
    Sets this UndoManager's mark to the current position.
    org.reactfx.value.Val<C>
    Gives a peek at the change that will be redone by redo().
    org.reactfx.value.Val<C>
    Gives a peek at the change that will be undone by undo().
    javafx.beans.value.ObservableBooleanValue
    Indicates whether this undo manager is currently performing undo or redo action.
    void
    Prevents the next change from being merged with the latest one.
    boolean
    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.
    boolean
    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> undoAvailableProperty
      Indicates whether there is a change that can be undone.
      See Also:
    • nextUndo

      org.reactfx.value.Val<C> nextUndoProperty
      Gives a peek at the change that will be undone by undo().
      See Also:
    • nextRedo

      org.reactfx.value.Val<C> nextRedoProperty
      Gives a peek at the change that will be redone by redo().
      See Also:
    • redoAvailable

      org.reactfx.value.Val<Boolean> redoAvailableProperty
      Indicates whether there is a change that can be redone.
      See Also:
    • performingAction

      javafx.beans.value.ObservableBooleanValue performingActionProperty
      Indicates whether this undo manager is currently performing undo or redo action.
      See Also:
    • atMarkedPosition

      javafx.beans.value.ObservableBooleanValue atMarkedPositionProperty
      Indicates 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:
      true if a change was undone, false otherwise.
    • redo

      boolean redo()
      Redo previously undone change, if there is any change to redo.
      Returns:
      true if a change was redone, false otherwise.
    • undoAvailableProperty

      org.reactfx.value.Val<Boolean> undoAvailableProperty()
      Indicates whether there is a change that can be undone.
      Returns:
      the undoAvailable property
    • isUndoAvailable

      boolean isUndoAvailable()
    • nextUndoProperty

      org.reactfx.value.Val<C> nextUndoProperty()
      Gives a peek at the change that will be undone by undo().
      Returns:
      the nextUndo property
      See Also:
    • getNextUndo

      default C getNextUndo()
      Gets the value of the nextUndo property.
      Property description:
      Gives a peek at the change that will be undone by undo().
      Returns:
      the value of the nextUndo property
      See Also:
    • nextRedoProperty

      org.reactfx.value.Val<C> nextRedoProperty()
      Gives a peek at the change that will be redone by redo().
      Returns:
      the nextRedo property
      See Also:
    • getNextRedo

      default C getNextRedo()
      Gets the value of the nextRedo property.
      Property description:
      Gives a peek at the change that will be redone by redo().
      Returns:
      the value of the nextRedo property
      See Also:
    • redoAvailableProperty

      org.reactfx.value.Val<Boolean> redoAvailableProperty()
      Indicates whether there is a change that can be redone.
      Returns:
      the redoAvailable property
    • isRedoAvailable

      boolean isRedoAvailable()
    • performingActionProperty

      javafx.beans.value.ObservableBooleanValue performingActionProperty()
      Indicates whether this undo manager is currently performing undo or redo action.
      Returns:
      the performingAction property
    • 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 for getCurrentPosition().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 atMarkedPosition property
    • isAtMarkedPosition

      boolean isAtMarkedPosition()
    • close

      void close()
      Stops observing change events.