Interface FxTextComponent

    • Method Detail

      • getErrorOffset

        java.lang.Integer getErrorOffset()
        Gets the error offset.
        Returns:
        the offset, null if no offset
      • setErrorOffset

        void setErrorOffset​(java.lang.Integer errorOffset)
        Sets the error offset.
        Parameters:
        errorOffset - null to clear
      • mapErrorOffsetToCaretPosition

        void mapErrorOffsetToCaretPosition()
        Sets the caret position according to the error offset.
        Does nothing if error offset is null.
      • setTextAlignment

        void setTextAlignment​(javafx.geometry.Pos textAlignment)
        Sets the text alignment.
        Parameters:
        textAlignment - the alignment, null if component's default
      • getTextAlignment

        javafx.geometry.Pos getTextAlignment()
        Gets the text alignment.
        Returns:
        the alignment, null if component's default
      • setColumns

        void setColumns​(int columns)
        Sets the number of columns in this component.
        The visible width is adjusted according to the current font.
        Parameters:
        columns - the number of columns ≥ 0
      • getColumns

        int getColumns()
        Gets the columns.
        Returns:
        the columns
      • setMaxColumns

        void setMaxColumns​(int maxColumns)
        Sets the maximum number of columns.
        The number of columns will be enforced by the model.
        Parameters:
        maxColumns - the maximum number of columns, 0 if unlimited (default)
      • getMaxColumns

        int getMaxColumns()
        Gets the maximum number of columns.
        Returns:
        the maximum number of columns, 0 if unlimited (default)
      • setAutoSelect

        void setAutoSelect​(boolean autoSelect)
        Sets the auto-select feature.
        A component with autoselect enabled will automatically select all characters if the component gets the keyboard focus. Useful for numerical fields, for example.
        Parameters:
        autoSelect - true if autoselect enabled, false if disabled (default)
      • isAutoSelect

        boolean isAutoSelect()
        Returns whether the auto-select feature is enabled.
        Returns:
        true if autoselect enabled, false if disabled (default)
      • setPattern

        void setPattern​(java.lang.String pattern)
        Sets the format pattern.
        The format pattern is used to format the view of the data.
        Parameters:
        pattern - the format pattern
      • getPattern

        java.lang.String getPattern()
        Gets the format pattern.
        Returns:
        the format pattern
      • isLenient

        boolean isLenient()
        Returns whether parsing to model should be lenient.
        Returns:
        true if lenient, false is default
      • setLenient

        void setLenient​(boolean lenient)
        Sets whether parsing to model should be lenient.
        Parameters:
        lenient - true if lenient
      • setScale

        void setScale​(int scale)
        Changes the format according to the given scale.
        Parameters:
        scale - the number of digits after the comma
      • getScale

        int getScale()
        Gets the current scale.
        Returns:
        the scale
      • setUnsigned

        void setUnsigned​(boolean unsigned)
        Sets whether a numeric field is unsigned or signed.
        Parameters:
        unsigned - true if unsigned
      • isUnsigned

        boolean isUnsigned()
        Returns whether a numeric field is unsigned or signed.
        Returns:
        true if unsigned
      • setUTC

        void setUTC​(boolean utc)
        Sets whether this is a UTC timestamp.
        Parameters:
        utc - true if UTC
      • isUTC

        boolean isUTC()
        Returns whether this is a UTC timestamp.
        Returns:
        true if UTC
      • setCaseConversion

        void setCaseConversion​(CaseConversion caseConversion)
        Sets the case conversion.
        Parameters:
        caseConversion - the conversion, null if no conversion (default)
      • getCaseConversion

        CaseConversion getCaseConversion()
        Gets the case conversion.
        Returns:
        the conversion, null if no conversion (default)
      • setFiller

        void setFiller​(char filler)
        Sets the filler character.
        The default is space.
        Parameters:
        filler - the filler
      • getFiller

        char getFiller()
        Gets the filler character.
        Returns:
        the filler
      • setValidChars

        void setValidChars​(java.lang.String validChars)
        Sets allowed characters.
        Parameters:
        validChars - the valid characters, null = all (default)
      • getValidChars

        java.lang.String getValidChars()
        Gets allowed characters.
        Returns:
        the valid characters, null = all (default)
      • setInvalidChars

        void setInvalidChars​(java.lang.String invalidChars)
        Sets invalid characters.
        Parameters:
        invalidChars - the invalid characters, null = none (default)
      • getInvalidChars

        java.lang.String getInvalidChars()
        Gets invalid characters.
        Returns:
        the invalid characters, null = none (default)
      • setTextConverter

        void setTextConverter​(java.util.function.Function<java.lang.String,​java.lang.String> textConverter)
        Sets a text converter.
        Converts input text to the view's text.
        Parameters:
        textConverter - the converter
      • getTextConverter

        java.util.function.Function<java.lang.String,​java.lang.String> getTextConverter()
        Gets the text converter.
        Returns:
        the converter
      • autoSelect

        void autoSelect()
        Selects or deselects all text in the text input.
        See Also:
        isAutoSelect()