Interface EditableComponent


public interface EditableComponent
EditableComponent defines an API for objects which can perform clipboard operations and have a selection.
Author:
Werner Randelshofer
  • Property Summary

    Properties
    Type
    Property
    Description
    @Nullable javafx.beans.property.ReadOnlyBooleanProperty
    Returns true if the selection is empty.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Since sub-classing of a JavaFX component is not convenient, when the component is defined in a FXML file, an editable component can be provided for a JavaFX node by setting the property EDITABLE_COMPONENT.
    static final String
    The name of the selectionEmpty property.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears the selection.
    void
    Transfers the contents of the current selection to the clipboard, leaving the current selection.
    void
    cut()
    Transfers the contents of the current selection to the clipboard, removing the current selection.
    void
    Deletes the selected region or the component at (or after) the caret position.
    void
    Duplicates the selected region.
    void
    Transfers the contents from the clipboard replacing the current selection.
    void
    Selects all.
    @Nullable javafx.beans.property.ReadOnlyBooleanProperty
    Returns true if the selection is empty.
  • Property Details

    • selectionEmpty

      @Nullable javafx.beans.property.ReadOnlyBooleanProperty selectionEmptyProperty
      Returns true if the selection is empty. This is a bound property.
      See Also:
  • Field Details

    • EDITABLE_COMPONENT

      static final String EDITABLE_COMPONENT
      Since sub-classing of a JavaFX component is not convenient, when the component is defined in a FXML file, an editable component can be provided for a JavaFX node by setting the property EDITABLE_COMPONENT.
      See Also:
    • SELECTION_EMPTY

      static final String SELECTION_EMPTY
      The name of the selectionEmpty property.
      See Also:
  • Method Details

    • selectAll

      void selectAll()
      Selects all.
    • clearSelection

      void clearSelection()
      Clears the selection.
    • selectionEmptyProperty

      @Nullable javafx.beans.property.ReadOnlyBooleanProperty selectionEmptyProperty()
      Returns true if the selection is empty. This is a bound property.
      Returns:
      true if empty
    • deleteSelection

      void deleteSelection()
      Deletes the selected region or the component at (or after) the caret position.
    • duplicateSelection

      void duplicateSelection()
      Duplicates the selected region.
    • cut

      void cut()
      Transfers the contents of the current selection to the clipboard, removing the current selection.
    • copy

      void copy()
      Transfers the contents of the current selection to the clipboard, leaving the current selection.
    • paste

      void paste()
      Transfers the contents from the clipboard replacing the current selection. If there is no selection, the contents in the clipboard is inserted at the current insertion point.