String. How the text
will be styled is not yet specified in this class, but use StyleClassedTextField for a style class
approach to styling the text and InlineCssTextField for an inline css approach to styling the text.
Use CSS Style Class ".styled-text-field" for styling the control.
| Modifier and Type | Field and Description |
|---|---|
| private static final List | |
| private static double | |
| private ObjectProperty | onAction
The action handler associated with this text field, or |
| private static final CssMetaData | |
| private StyleableObjectProperty | |
| private boolean | |
| private static final String | |
| private static final CssMetaData | |
| private StyleableObjectProperty | |
| private static final Pattern |
| Access | Constructor and Description |
|---|---|
| public | StyledTextField(PS initialParagraphStyle, BiConsumer<TextFlow, PS> applyParagraphStyle, S initialTextStyle, BiConsumer<? super TextExt, S> applyStyle, EditableStyledDocument<PS, String, S> document)
|
| Modifier and Type | Method and Description |
|---|---|
| public final ObjectProperty | alignmentProperty()
Specifies how the text should be aligned when there is empty space within the TextField. |
| private double | |
| protected abstract void | |
| protected void | configurePlaceholder(Node placeholder)
Overrides org. Override this to customize the placeholder's layout. |
| public final TextAlignment | |
| public static List | getClassCssMetaData()
Hides org. Gets the |
| public List | getCssMetaData()
Overrides org. Implements javafx. This method should delegate to |
| public final EventHandler | |
| public final Text | |
| public boolean | isWrapText()
Overrides org. Overrides default org. This always returns false for styled text fields. |
| public final ObjectProperty | |
| private final ObjectProperty | |
| public final ObjectProperty | |
| public void | replaceText(int start, int end, String text)
Overrides org. Implements org. Replaces a range of characters with the given text. |
| public final void | |
| public final void | |
| public void | setPlaceholder(Node value, Pos where)
Overrides org. setPlaceholder is not supported by StyledTextField, use setPromptText instead |
| public final void | |
| public void | |
| public void | setWrapText(boolean value)
Overrides org. Overrides default org.
Deprecated
This is a no op for text fields and therefore marked as deprecated. |
| private Node |
| CSS_META_DATA_LIST | back to summary |
|---|---|
| private static final List<CssMetaData<? extends Styleable, ?>> CSS_META_DATA_LIST Hides org. | |
| HEIGHT | back to summary |
|---|---|
| private static double HEIGHT | |
| onAction | back to summary |
|---|---|
| private ObjectProperty<EventHandler<ActionEvent>> onAction The action handler associated with this text field, or | |
| PROMPT_TEXT_FILL | back to summary |
|---|---|
| private static final CssMetaData<StyledTextField<PS, S>, Paint> PROMPT_TEXT_FILL | |
| promptFillProp | back to summary |
|---|---|
| private StyleableObjectProperty<Paint> promptFillProp | |
| selectAll | back to summary |
|---|---|
| private boolean selectAll | |
| STYLE_SHEET | back to summary |
|---|---|
| private static final String STYLE_SHEET | |
| TEXT_ALIGNMENT | back to summary |
|---|---|
| private static final CssMetaData<StyledTextField<PS, S>, TextAlignment> TEXT_ALIGNMENT | |
| textAlignment | back to summary |
|---|---|
| private StyleableObjectProperty<TextAlignment> textAlignment | |
| VERTICAL_WHITESPACE | back to summary |
|---|---|
| private static final Pattern VERTICAL_WHITESPACE | |
| StyledTextField | back to summary |
|---|---|
| public StyledTextField(PS initialParagraphStyle, BiConsumer<TextFlow, PS> applyParagraphStyle, S initialTextStyle, BiConsumer<? super TextExt, S> applyStyle, EditableStyledDocument<PS, String, S> document) | |
| alignmentProperty | back to summary |
|---|---|
| public final ObjectProperty Specifies how the text should be aligned when there is empty space within the TextField.
To configure via CSS use | |
| calcHorizontalPos | back to summary |
|---|---|
| private double calcHorizontalPos() | |
| changeAlignment | back to summary |
|---|---|
| protected abstract void changeAlignment(TextAlignment txtAlign) | |
| configurePlaceholder | back to summary |
|---|---|
| protected void configurePlaceholder(Node placeholder) Overrides org. Doc from org. Override this to customize the placeholder's layout.
| |
| getAlignment | back to summary |
|---|---|
| public final TextAlignment getAlignment() | |
| getClassCssMetaData | back to summary |
|---|---|
| public static List Hides org. Doc from javafx. Gets the | |
| getCssMetaData | back to summary |
|---|---|
| public List Overrides org. Implements javafx. Doc from javafx. This method should delegate to
| |
| getOnAction | back to summary |
|---|---|
| public final EventHandler | |
| getPromptText | back to summary |
|---|---|
| public final Text getPromptText() | |
| isWrapText | back to summary |
|---|---|
| public boolean isWrapText() Overrides org. Overrides default org. This always returns false for styled text fields.
| |
| onActionProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| promptTextFillProperty | back to summary |
|---|---|
| private final ObjectProperty | |
| promptTextProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| replaceText | back to summary |
|---|---|
| public void replaceText(int start, int end, String text) Overrides org. Implements org. Doc from org. Replaces a range of characters with the given text.
It must hold
| |
| setAlignment | back to summary |
|---|---|
| public final void setAlignment(TextAlignment value) | |
| setOnAction | back to summary |
|---|---|
| public final void setOnAction(EventHandler<ActionEvent> value) | |
| setPlaceholder | back to summary |
|---|---|
| public void setPlaceholder(Node value, Pos where) Overrides org. setPlaceholder is not supported by StyledTextField, use setPromptText instead
| |
| setPromptText | back to summary |
|---|---|
| public final void setPromptText(Text value) The prompt text to display or The Text will be aligned according to the text fields alignment setting and have a default text fill of GRAY unless you have changed it by any means, e.g. with CSS "-fx-prompt-text-fill" | |
| setText | back to summary |
|---|---|
| public void setText(String text) | |
| setWrapText | back to summary |
|---|---|
| public void setWrapText(boolean value) Overrides org. Overrides default org. Deprecated
This is a no op for text fields and therefore marked as deprecated.
| |
| traverse | back to summary |
|---|---|
| private Node traverse(Parent p, Node from, int dir) | |