public interface EditableComponent
EditableComponent defines an API for objects which can perform clipboard operations
and have a selection.
- Author:
- Werner Randelshofer
-
Property Summary
PropertiesTypePropertyDescription@Nullable javafx.beans.property.ReadOnlyBooleanPropertyReturns true if the selection is empty. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSince 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 StringThe name of the selectionEmpty property. -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the selection.voidcopy()Transfers the contents of the current selection to the clipboard, leaving the current selection.voidcut()Transfers the contents of the current selection to the clipboard, removing the current selection.voidDeletes the selected region or the component at (or after) the caret position.voidDuplicates the selected region.voidpaste()Transfers the contents from the clipboard replacing the current selection.voidSelects all.@Nullable javafx.beans.property.ReadOnlyBooleanPropertyReturns true if the selection is empty.
-
Property Details
-
selectionEmpty
@Nullable javafx.beans.property.ReadOnlyBooleanProperty selectionEmptyPropertyReturns true if the selection is empty. This is a bound property.- See Also:
-
-
Field Details
-
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
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.
-