- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.Parent
-
- javafx.scene.layout.Region
-
- javafx.scene.control.Control
-
- com.gluonhq.charm.glisten.control.TextInput
-
-
Property Summary
Properties Type Property Description ObjectProperty<Function<String,String>>
errorValidator
Sets an error message that will be displayed below the TextInput control.StringProperty
floatText
A String to be shown as a float text.StringProperty
promptText
The prompt text to display in theTextInput
, ornull
if no prompt text is displayed.ObjectProperty<TextFormatter<?>>
textFormatter
The property contains currently attachedTextFormatter
.StringProperty
text
The textual content of this TextInput.-
Properties inherited from class javafx.scene.control.Control
contextMenu, skin, tooltip
-
Properties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
-
Properties inherited from class javafx.scene.Parent
needsLayout
-
Properties inherited from class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
-
-
Field Summary
-
Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZE
-
Fields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT
-
-
Constructor Summary
Constructors Constructor Description TextInput()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectProperty<Function<String,String>>
errorValidatorProperty()
Sets an error message that will be displayed below the TextInput control.StringProperty
floatTextProperty()
A String to be shown as a float text.Function<String,String>
getErrorValidator()
Gets the value of the property errorValidator.String
getFloatText()
Gets the value of the property floatText.String
getPromptText()
Gets the value of the property promptText.String
getText()
Gets the value of the property text.TextFormatter<?>
getTextFormatter()
Gets the value of the property textFormatter.StringProperty
promptTextProperty()
The prompt text to display in theTextInput
, ornull
if no prompt text is displayed.void
setErrorValidator(Function<String,String> value)
Sets the value of the property errorValidator.void
setFloatText(String floatText)
Sets the value of the property floatText.void
setPromptText(String value)
Sets the value of the property promptText.void
setText(String value)
Sets the value of the property text.void
setTextFormatter(TextFormatter<?> value)
Sets the value of the property textFormatter.ObjectProperty<TextFormatter<?>>
textFormatterProperty()
The property contains currently attachedTextFormatter
.StringProperty
textProperty()
The textual content of this TextInput.-
Methods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, createDefaultSkin, executeAccessibleAction, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty
-
Methods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
-
Methods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
-
Methods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javafx.css.Styleable
getStyleableNode
-
-
-
-
Property Detail
-
promptText
public final StringProperty promptTextProperty
The prompt text to display in theTextInput
, ornull
if no prompt text is displayed.- See Also:
getPromptText()
,setPromptText(String)
-
text
public final StringProperty textProperty
The textual content of this TextInput.- See Also:
getText()
,setText(String)
-
floatText
public final StringProperty floatTextProperty
A String to be shown as a float text. A floatText acts similar to a promptText unless a focus is received by the textfield. On receiving focus, the floatText floats on top of the TextInput instead of disappearing.Style Guide:
For styling the float label, which is added as a direct child of the TextInput control, you can use the style-class "float".- See Also:
getFloatText()
,setFloatText(String)
-
errorValidator
public final ObjectProperty<Function<String,String>> errorValidatorProperty
Sets an error message that will be displayed below the TextInput control. TheFunction
evaluates the text from the TextInput control and returns a String with the error message. If the returned String isnull
orempty
, no error message will be displayed.Style Guide:
When the function returns a non-empty String, aPseudoClass
"error" is added to the TextInput. For styling the error label, which is added as a direct child of the TextInput control, you can use the style-class "error".- See Also:
getErrorValidator()
,setErrorValidator(Function)
-
textFormatter
public final ObjectProperty<TextFormatter<?>> textFormatterProperty
The property contains currently attachedTextFormatter
. Changing the TextFormatter will update the text in the TextInput control based on the new textFormatter.- Default value:
- null
- Since:
- 6.0.2
- See Also:
getTextFormatter()
,setTextFormatter(TextFormatter)
-
-
Method Detail
-
promptTextProperty
public final StringProperty promptTextProperty()
The prompt text to display in theTextInput
, ornull
if no prompt text is displayed.- See Also:
getPromptText()
,setPromptText(String)
-
getPromptText
public final String getPromptText()
Gets the value of the property promptText.- Property description:
- The prompt text to display in the
TextInput
, ornull
if no prompt text is displayed.
-
setPromptText
public final void setPromptText(String value)
Sets the value of the property promptText.- Property description:
- The prompt text to display in the
TextInput
, ornull
if no prompt text is displayed.
-
getText
public final String getText()
Gets the value of the property text.- Property description:
- The textual content of this TextInput.
-
setText
public final void setText(String value)
Sets the value of the property text.- Property description:
- The textual content of this TextInput.
-
textProperty
public final StringProperty textProperty()
The textual content of this TextInput.- See Also:
getText()
,setText(String)
-
getFloatText
public final String getFloatText()
Gets the value of the property floatText.- Property description:
- A String to be shown as a float text. A floatText acts similar to a promptText unless a focus
is received by the textfield. On receiving focus, the floatText floats on top of the TextInput
instead of disappearing.
Style Guide:
For styling the float label, which is added as a direct child of the TextInput control, you can use the style-class "float".
-
setFloatText
public final void setFloatText(String floatText)
Sets the value of the property floatText.- Property description:
- A String to be shown as a float text. A floatText acts similar to a promptText unless a focus
is received by the textfield. On receiving focus, the floatText floats on top of the TextInput
instead of disappearing.
Style Guide:
For styling the float label, which is added as a direct child of the TextInput control, you can use the style-class "float".
-
floatTextProperty
public final StringProperty floatTextProperty()
A String to be shown as a float text. A floatText acts similar to a promptText unless a focus is received by the textfield. On receiving focus, the floatText floats on top of the TextInput instead of disappearing.Style Guide:
For styling the float label, which is added as a direct child of the TextInput control, you can use the style-class "float".- See Also:
getFloatText()
,setFloatText(String)
-
errorValidatorProperty
public final ObjectProperty<Function<String,String>> errorValidatorProperty()
Sets an error message that will be displayed below the TextInput control. TheFunction
evaluates the text from the TextInput control and returns a String with the error message. If the returned String isnull
orempty
, no error message will be displayed.Style Guide:
When the function returns a non-empty String, aPseudoClass
"error" is added to the TextInput. For styling the error label, which is added as a direct child of the TextInput control, you can use the style-class "error".- See Also:
getErrorValidator()
,setErrorValidator(Function)
-
getErrorValidator
public final Function<String,String> getErrorValidator()
Gets the value of the property errorValidator.- Property description:
- Sets an error message that will be displayed below the TextInput control. The
Function
evaluates the text from the TextInput control and returns a String with the error message. If the returned String isnull
orempty
, no error message will be displayed.Style Guide:
When the function returns a non-empty String, aPseudoClass
"error" is added to the TextInput. For styling the error label, which is added as a direct child of the TextInput control, you can use the style-class "error".
-
setErrorValidator
public final void setErrorValidator(Function<String,String> value)
Sets the value of the property errorValidator.- Property description:
- Sets an error message that will be displayed below the TextInput control. The
Function
evaluates the text from the TextInput control and returns a String with the error message. If the returned String isnull
orempty
, no error message will be displayed.Style Guide:
When the function returns a non-empty String, aPseudoClass
"error" is added to the TextInput. For styling the error label, which is added as a direct child of the TextInput control, you can use the style-class "error".
-
textFormatterProperty
public final ObjectProperty<TextFormatter<?>> textFormatterProperty()
The property contains currently attachedTextFormatter
. Changing the TextFormatter will update the text in the TextInput control based on the new textFormatter.- Default value:
- null
- Since:
- 6.0.2
- See Also:
getTextFormatter()
,setTextFormatter(TextFormatter)
-
getTextFormatter
public final TextFormatter<?> getTextFormatter()
Gets the value of the property textFormatter.- Property description:
- The property contains currently attached
TextFormatter
. Changing the TextFormatter will update the text in the TextInput control based on the new textFormatter. - Default value:
- null
- Since:
- 6.0.2
-
setTextFormatter
public final void setTextFormatter(TextFormatter<?> value)
Sets the value of the property textFormatter.- Property description:
- The property contains currently attached
TextFormatter
. Changing the TextFormatter will update the text in the TextInput control based on the new textFormatter. - Default value:
- null
- Since:
- 6.0.2
-
-