Class TextInputControlUndoAdapter

java.lang.Object
org.jhotdraw8.fxbase.control.TextInputControlUndoAdapter
All Implemented Interfaces:
Function<javafx.scene.control.TextFormatter.Change,javafx.scene.control.TextFormatter.Change>, UnaryOperator<javafx.scene.control.TextFormatter.Change>

public class TextInputControlUndoAdapter extends Object implements UnaryOperator<javafx.scene.control.TextFormatter.Change>
This adapter can be bound to a TextInputControl to support undo/redo with a FXUndoManager.

This text filter can be added to multiple text input controls. If you do this, make sure that you add the FXUndoManager only once as a listener.

  • Constructor Details

    • TextInputControlUndoAdapter

      public TextInputControlUndoAdapter()
    • TextInputControlUndoAdapter

      public TextInputControlUndoAdapter(javafx.scene.control.TextInputControl control)
  • Method Details

    • bind

      public void bind(javafx.scene.control.TextInputControl control)
    • unbind

      public void unbind(javafx.scene.control.TextInputControl control)
    • addUndoEditListener

      public void addUndoEditListener(UndoableEditListener listener)
    • apply

      public javafx.scene.control.TextFormatter.Change apply(javafx.scene.control.TextFormatter.Change change)
      Specified by:
      apply in interface Function<javafx.scene.control.TextFormatter.Change,javafx.scene.control.TextFormatter.Change>
    • removeUndoEditListener

      public void removeUndoEditListener(UndoableEditListener listener)