The user can select text by pressing and dragging the mouse, or by double clicking on a word. A triple click selects an entire paragraph.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final BooleanProperty | |
| private final ObjectProperty | highlightFill
Defines the |
| private final ObjectProperty | highlightStroke
Defines the |
| private final ObjectProperty | highlightTextFill
Defines the |
| private final ReadOnlyStringWrapper | |
| private final StringProperty |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| protected Skin | createDefaultSkin()
Overrides javafx. Create a new instance of the default skin for this control. |
| public final BooleanProperty | Returns: the "disable selection by mouse clicks" propertyThe text view allows the user to select text elements by double or tripple clicking on it. |
| private void | |
| public static List | getClassCssMetaData()
Hides javafx. Gets the |
| public Orientation | getContentBias()
Overrides javafx. Returns the orientation of a node's resizing bias for layout purposes. |
| protected List | getControlCssMetaData()
Overrides javafx. Gets the unmodifiable list of the control's CSS-styleable properties. |
| public final Paint | |
| public final Paint | |
| public final Paint | |
| public final String | |
| public final String | |
| public String | getUserAgentStylesheet()
Overrides javafx. An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. |
| public final ObjectProperty | Returns: the highlight fill property.The property for the |
| public final ObjectProperty | Returns: the highlight stroke property.The property for the |
| public final ObjectProperty | Returns: the highlight text fill property.The property for the |
| public final boolean | |
| public final ReadOnlyStringProperty | |
| public final void | |
| public final void | setHighlightFill(Paint
the highlight fill value)The fill |
| public final void | setHighlightStroke(Paint
the paint to use for the selection highlight's stroke. value)Sets the |
| public final void | setHighlightTextFill(Paint
the highlight text fill value)The fill |
| public final void | |
| public final StringProperty |
| disableTextSelectionByMouseClicks | back to summary |
|---|---|
| private final BooleanProperty disableTextSelectionByMouseClicks | |
| highlightFill | back to summary |
|---|---|
| private final ObjectProperty<Paint> highlightFill Defines the | |
| highlightStroke | back to summary |
|---|---|
| private final ObjectProperty<Paint> highlightStroke Defines the | |
| highlightTextFill | back to summary |
|---|---|
| private final ObjectProperty<Paint> highlightTextFill Defines the | |
| selectedText | back to summary |
|---|---|
| private final ReadOnlyStringWrapper selectedText | |
| text | back to summary |
|---|---|
| private final StringProperty text | |
| TextView | back to summary |
|---|---|
| public TextView() Constructs a new text view. | |
| TextView | back to summary |
|---|---|
| public TextView(String text) Constructs a new text view.
| |
| copyAll | back to summary |
|---|---|
| public void copyAll() Copy the entire text to the clipboard. This method is intentionally non-final so that applications can implement their own logic. | |
| copySelection | back to summary |
|---|---|
| public void copySelection() Copy the text to the clipboard. This method is intentionally non-final so that applications can implement their own logic. | |
| createDefaultSkin | back to summary |
|---|---|
| protected Skin Overrides javafx. Doc from javafx. Create a new instance of the default skin for this control. This is called to create a skin for the control if
no skin is provided via CSS
| |
| disableTextSelectionByMouseClicksProperty | back to summary |
|---|---|
| public final BooleanProperty disableTextSelectionByMouseClicksProperty() The text view allows the user to select text elements by double or tripple clicking on it. This property can be used to disable this behavior.
| |
| doCopy | back to summary |
|---|---|
| private void doCopy(String text) | |
| getClassCssMetaData | back to summary |
|---|---|
| public static List Hides javafx. Doc from javafx. Gets the | |
| getContentBias | back to summary |
|---|---|
| public Orientation getContentBias() Overrides javafx. Doc from javafx. Returns the orientation of a node's resizing bias for layout purposes. If the node type has no bias, returns null. If the node is resizable and it's height depends on its width, returns HORIZONTAL, else if its width depends on its height, returns VERTICAL. Resizable subclasses should override this method to return an appropriate value.
| |
| getControlCssMetaData | back to summary |
|---|---|
| protected List Overrides javafx. Doc from javafx. Gets the unmodifiable list of the control's CSS-styleable properties.
| |
| getHighlightFill | back to summary |
|---|---|
| public final Paint getHighlightFill() | |
| getHighlightStroke | back to summary |
|---|---|
| public final Paint getHighlightStroke() | |
| getHighlightTextFill | back to summary |
|---|---|
| public final Paint getHighlightTextFill() | |
| getSelectedText | back to summary |
|---|---|
| public final String getSelectedText() String property used to save selected skin text
| |
| getText | back to summary |
|---|---|
| public final String getText() | |
| getUserAgentStylesheet | back to summary |
|---|---|
| public String getUserAgentStylesheet() Overrides javafx. Doc from javafx. An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. These styles are used in addition to whatever user-agent stylesheets are in use. This provides a mechanism for third parties to introduce styles for custom controls. The URL is a hierarchical URI of the form [scheme:][//authority][path]. If the URL does not have a [scheme:] component, the URL is considered to be the [path] component only. Any leading '/' character of the [path] is ignored and the [path] is treated as a path relative to the root of the application's classpath. Subclasses overriding this method should not assume any particular implementation approach as to the number and frequency with which it is called. For this reason, attempting any kind of dynamic implementation (i.e. returning different user agent stylesheet values) based on some state change is highly discouraged, as there is no guarantee when, or even if, this method will be called. Some JavaFX CSS implementations may choose to cache this response for an indefinite period of time, and therefore there should be no expectation around when this method is called.
For additional information about using CSS with the scene graph,
see the CSS Reference Guide.
| |
| highlightFillProperty | back to summary |
|---|---|
| public final ObjectProperty The property for the
| |
| highlightStrokeProperty | back to summary |
|---|---|
| public final ObjectProperty The property for the
| |
| highlightTextFillProperty | back to summary |
|---|---|
| public final ObjectProperty The property for the
| |
| isDisableTextSelectionByMouseClicks | back to summary |
|---|---|
| public final boolean isDisableTextSelectionByMouseClicks() | |
| selectedTextProperty | back to summary |
|---|---|
| public final ReadOnlyStringProperty selectedTextProperty() | |
| setDisableTextSelectionByMouseClicks | back to summary |
|---|---|
| public final void setDisableTextSelectionByMouseClicks(boolean disableTextSelectionByMouseClicks) | |
| setHighlightFill | back to summary |
|---|---|
| public final void setHighlightFill(Paint value) The fill
| |
| setHighlightStroke | back to summary |
|---|---|
| public final void setHighlightStroke(Paint value) Sets the
| |
| setHighlightTextFill | back to summary |
|---|---|
| public final void setHighlightTextFill(Paint value) The fill
| |
| setText | back to summary |
|---|---|
| public final void setText(String text) | |
| textProperty | back to summary |
|---|---|
| public final StringProperty textProperty() Stores the text displayed by the view.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final CssMetaData | |
| private static final CssMetaData | |
| private static final CssMetaData | |
| private static final List |
| Access | Constructor and Description |
|---|---|
| private |
| HIGHLIGHT_FILL | back to summary |
|---|---|
| private static final CssMetaData<TextView, Paint> HIGHLIGHT_FILL | |
| HIGHLIGHT_STROKE | back to summary |
|---|---|
| private static final CssMetaData<TextView, Paint> HIGHLIGHT_STROKE | |
| HIGHLIGHT_TEXT_FILL | back to summary |
|---|---|
| private static final CssMetaData<TextView, Paint> HIGHLIGHT_TEXT_FILL | |
| STYLEABLES | back to summary |
|---|---|
| private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES | |
| StyleableProperties | back to summary |
|---|---|
| private StyleableProperties() | |