org.fxmisc.richtext.model.UndoActions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of richtextfx Show documentation
Show all versions of richtextfx Show documentation
Rich-text area for JavaFX
The newest version!
package org.fxmisc.richtext.model;
import org.fxmisc.undo.UndoManager;
import org.fxmisc.undo.UndoManagerFactory;
import org.reactfx.value.Val;
/**
* Undo/redo actions for {@link TextEditingArea}.
*/
public interface UndoActions {
/**
* Undo manager of this text area.
*/
UndoManager getUndoManager();
void setUndoManager(UndoManagerFactory undoManagerFactory);
default void undo() { getUndoManager().undo(); }
default void redo() { getUndoManager().redo(); }
default boolean isUndoAvailable() { return getUndoManager().isUndoAvailable(); }
default Val undoAvailableProperty() { return getUndoManager().undoAvailableProperty(); }
default boolean isRedoAvailable() { return getUndoManager().isRedoAvailable(); }
default Val redoAvailableProperty() { return getUndoManager().redoAvailableProperty(); }
}