If the text length range is not specified, the value of the text length indicator label will reflect the number of characters in the text area. If a range is specified, the label will show the difference between the current text length and the maximum allowed character count. Should the text exceed the allowed maximum, the label will display a negative number.
Use cases include form fields where input character count is restricted within a certain range for validation purposes, or text areas that need to filter out specific unwanted characters or phrases.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ObjectProperty | |
| private static final boolean | |
| private static final String | |
| private final ObservableList | excludedItems
A list of items that should be excluded from the text content. |
| private final ObjectProperty | |
| private final ReadOnlyBooleanWrapper | |
| private BooleanProperty | |
| private final StringProperty | |
| private final DoubleProperty |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final ObjectProperty | Returns: the character range limit propertyThe character range limit property defines the minimum and maximum number of characters allowed in the text area. |
| protected Skin | createDefaultSkin()
Overrides com. Create a new instance of the default skin for this control. |
| public final IntegerRange | |
| public static List | getClassCssMetaData()
Hides javafx. Gets the |
| public List | getControlCssMetaData()
Overrides javafx. Gets the unmodifiable list of the control's CSS-styleable properties. |
| public final ObservableList | |
| public final LimitedTextArea. | |
| public final String | |
| public String | getUserAgentStylesheet()
Overrides com. An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. |
| public final double | |
| public final double | |
| public final boolean | |
| public final boolean | |
| public final ObjectProperty | Returns: the length display mode propertyThe length display mode property defines when the text length indicator label should be displayed. |
| public final ReadOnlyBooleanProperty | outOfRangeProperty()
A read-only property indicating whether the text content is over the maximum length or under the minimum length. |
| public final void | |
| public final void | |
| private final void | |
| public final void | |
| public final void | |
| public final void | |
| public final BooleanProperty | |
| public final StringProperty | |
| public final DoubleProperty |
| characterRangeLimit | back to summary |
|---|---|
| private final ObjectProperty<IntegerRange> characterRangeLimit | |
| DEFAULT_SHOW_BOTTOM | back to summary |
|---|---|
| private static final boolean DEFAULT_SHOW_BOTTOM | |
| DEFAULT_STYLE_CLASS | back to summary |
|---|---|
| private static final String DEFAULT_STYLE_CLASS | |
| excludedItems | back to summary |
|---|---|
| private final ObservableList<String> excludedItems A list of items that should be excluded from the text content. e.g. "\r", "\n", "\t" ,"." etc. | |
| lengthDisplayMode | back to summary |
|---|---|
| private final ObjectProperty<LimitedTextArea. | |
| outOfRange | back to summary |
|---|---|
| private final ReadOnlyBooleanWrapper outOfRange | |
| showBottom | back to summary |
|---|---|
| private BooleanProperty showBottom | |
| tips | back to summary |
|---|---|
| private final StringProperty tips | |
| warningThreshold | back to summary |
|---|---|
| private final DoubleProperty warningThreshold | |
| LimitedTextArea | back to summary |
|---|---|
| public LimitedTextArea() | |
| LimitedTextArea | back to summary |
|---|---|
| public LimitedTextArea(String text) | |
| characterRangeLimitProperty | back to summary |
|---|---|
| public final ObjectProperty The character range limit property defines the minimum and maximum number of characters allowed in the text area.
| |
| createDefaultSkin | back to summary |
|---|---|
| protected Skin Overrides com. 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
| |
| getCharacterRangeLimit | back to summary |
|---|---|
| public final IntegerRange getCharacterRangeLimit() | |
| getClassCssMetaData | back to summary |
|---|---|
| public static List Hides javafx. Doc from javafx. Gets the | |
| getControlCssMetaData | back to summary |
|---|---|
| public List Overrides javafx. Doc from javafx. Gets the unmodifiable list of the control's CSS-styleable properties.
| |
| getExcludedItems | back to summary |
|---|---|
| public final ObservableList | |
| getLengthDisplayMode | back to summary |
|---|---|
| public final LimitedTextArea. | |
| getTips | back to summary |
|---|---|
| public final String getTips() | |
| getUserAgentStylesheet | back to summary |
|---|---|
| public String getUserAgentStylesheet() Overrides com. 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.
| |
| getValidWarningThreshold | back to summary |
|---|---|
| public final double getValidWarningThreshold() | |
| getWarningThreshold | back to summary |
|---|---|
| public final double getWarningThreshold() | |
| isOutOfRange | back to summary |
|---|---|
| public final boolean isOutOfRange() | |
| isShowBottom | back to summary |
|---|---|
| public final boolean isShowBottom() | |
| lengthDisplayModeProperty | back to summary |
|---|---|
| public final ObjectProperty The length display mode property defines when the text length indicator label should be displayed.
| |
| outOfRangeProperty | back to summary |
|---|---|
| public final ReadOnlyBooleanProperty outOfRangeProperty() A read-only property indicating whether the text content is over the maximum length or under the minimum length. | |
| setCharacterRangeLimit | back to summary |
|---|---|
| public final void setCharacterRangeLimit(IntegerRange characterRangeLimit) | |
| setLengthDisplayMode | back to summary |
|---|---|
| public final void setLengthDisplayMode(LimitedTextArea. | |
| setOutOfRange | back to summary |
|---|---|
| private final void setOutOfRange(boolean outOfRange) | |
| setShowBottom | back to summary |
|---|---|
| public final void setShowBottom(boolean showBottom) | |
| setTips | back to summary |
|---|---|
| public final void setTips(String tips) | |
| setWarningThreshold | back to summary |
|---|---|
| public final void setWarningThreshold(double warningThreshold) | |
| showBottomProperty | back to summary |
|---|---|
| public final BooleanProperty showBottomProperty() | |
| tipsProperty | back to summary |
|---|---|
| public final StringProperty tipsProperty() The tips property used to display a hint or description of the text area. | |
| warningThresholdProperty | back to summary |
|---|---|
| public final DoubleProperty warningThresholdProperty() The warning threshold is a value between 0 and 1. When the text length is greater than or equal to the maximum length times the warning threshold, the warning style will be applied. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final LimitedTextArea. | ALWAYS_HIDE
Always hide the length indicator. |
| public static final LimitedTextArea. | ALWAYS_SHOW
Always show the length indicator. |
| public static final LimitedTextArea. | AUTO
When in a warning or error state, the text length indicator label will be displayed. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static LimitedTextArea. | |
| public static LimitedTextArea. |
| ALWAYS_HIDE | back to summary |
|---|---|
| public static final LimitedTextArea. Always hide the length indicator. | |
| ALWAYS_SHOW | back to summary |
|---|---|
| public static final LimitedTextArea. Always show the length indicator. | |
| AUTO | back to summary |
|---|---|
| public static final LimitedTextArea. When in a warning or error state, the text length indicator label will be displayed. | |
| LengthDisplayMode | back to summary |
|---|---|
| private LengthDisplayMode() | |
| valueOf | back to summary |
|---|---|
| public static LimitedTextArea. | |
| values | back to summary |
|---|---|
| public static LimitedTextArea. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final CssMetaData | |
| private static final List |
| Access | Constructor and Description |
|---|---|
| private |
| SHOW_BOTTOM | back to summary |
|---|---|
| private static final CssMetaData<LimitedTextArea, Boolean> SHOW_BOTTOM | |
| STYLEABLES | back to summary |
|---|---|
| private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES | |
| StyleableProperties | back to summary |
|---|---|
| private StyleableProperties() | |