Module jpro.webapi

Interface JProTextInputControl


public interface JProTextInputControl
This interface can be implemented by a JavaFX Node. When an TextInputControl is used with JPro, in the Browser a hidden input field is used to capture the input. Using this interface creates the same behavior in JavaFX without the need to extend TextInputControl.
  • Property Summary

    Properties
    Type
    Property
    Description
    javafx.beans.property.IntegerProperty
    The anchor of the selection.
    javafx.beans.property.IntegerProperty
    Provides access to the caret position property.
    javafx.beans.property.ReadOnlyBooleanProperty
    Whether the control is editable or not.
    javafx.beans.property.StringProperty
    The text that is displayed in the control.
    javafx.beans.property.StringProperty
    The text that is displayed in the control.
  • Method Summary

    Modifier and Type
    Method
    Description
    javafx.beans.property.IntegerProperty
    The anchor of the selection.
    javafx.beans.property.IntegerProperty
    Provides access to the caret position property.
    javafx.beans.property.ReadOnlyBooleanProperty
    Whether the control is editable or not.
    default int
    Gets the position of the anchor in the text control.
    default int
    Retrieves the current position of the caret (cursor) in the text control.
    default String
    Retrieves the current text from the text input control.
    default String
    Retrieves the type of virtual keyboard that is used with this control.
    default boolean
    Checks if the text input control is editable.
    boolean
    Determines whether the text input control is a TextArea.
    void
    selectRange(int anchor, int caretPosition)
    Selects a range of text in the text input control.
    default void
    setAnchor(int anchor)
    Sets the position of the anchor in the text control.
    default void
    setCaretPosition(int caretPosition)
    Sets the position of the caret (cursor) in the text control.
    default void
    Sets the text in the text input control to the specified string.
    default void
    setVkType(String vkType)
    Sets the type of virtual keyboard to be used with this control.
    javafx.beans.property.StringProperty
    The text that is displayed in the control.
    javafx.beans.property.StringProperty
    The text that is displayed in the control.
  • Property Details

    • text

      javafx.beans.property.StringProperty textProperty
      The text that is displayed in the control.
      See Also:
    • vkType

      javafx.beans.property.StringProperty vkTypeProperty
      The text that is displayed in the control.
      See Also:
    • anchor

      javafx.beans.property.IntegerProperty anchorProperty
      The anchor of the selection.
      See Also:
    • caretPosition

      javafx.beans.property.IntegerProperty caretPositionProperty
      Provides access to the caret position property. The caret position indicates the current position of the caret (cursor) within the text.
      See Also:
    • editable

      javafx.beans.property.ReadOnlyBooleanProperty editableProperty
      Whether the control is editable or not.
      See Also:
  • Method Details

    • isTextArea

      boolean isTextArea()
      Determines whether the text input control is a TextArea.
      Returns:
      true if the text input control is a TextArea, false otherwise.
    • getText

      default String getText()
      Retrieves the current text from the text input control.
      Returns:
      the current text as a String.
    • setText

      default void setText(String text)
      Sets the text in the text input control to the specified string.
      Parameters:
      text - the new text to set in the control.
    • textProperty

      javafx.beans.property.StringProperty textProperty()
      The text that is displayed in the control.
      See Also:
    • getVkType

      default String getVkType()
      Retrieves the type of virtual keyboard that is used with this control.
      Returns:
      the type of virtual keyboard as a String.
    • setVkType

      default void setVkType(String vkType)
      Sets the type of virtual keyboard to be used with this control.
      Parameters:
      vkType - the type of virtual keyboard to set.
    • vkTypeProperty

      javafx.beans.property.StringProperty vkTypeProperty()
      The text that is displayed in the control.
      See Also:
    • getAnchor

      default int getAnchor()
      Gets the position of the anchor in the text control. The anchor, together with the caret, defines the text selection.
      Returns:
      the position of the anchor as an integer.
    • setAnchor

      default void setAnchor(int anchor)
      Sets the position of the anchor in the text control. The anchor, v together with the caret, defines the text selection.
      Parameters:
      anchor - the new position of the anchor.
    • anchorProperty

      javafx.beans.property.IntegerProperty anchorProperty()
      The anchor of the selection.
      See Also:
    • getCaretPosition

      default int getCaretPosition()
      Retrieves the current position of the caret (cursor) in the text control.
      Returns:
      the current caret position as an integer.
    • setCaretPosition

      default void setCaretPosition(int caretPosition)
      Sets the position of the caret (cursor) in the text control.
      Parameters:
      caretPosition - the new position of the caret.
    • caretPositionProperty

      javafx.beans.property.IntegerProperty caretPositionProperty()
      Provides access to the caret position property. The caret position indicates the current position of the caret (cursor) within the text.
      See Also:
    • isEditable

      default boolean isEditable()
      Checks if the text input control is editable.
      Returns:
      true if the control is editable, false otherwise.
    • editableProperty

      javafx.beans.property.ReadOnlyBooleanProperty editableProperty()
      Whether the control is editable or not.
      See Also:
    • selectRange

      void selectRange(int anchor, int caretPosition)
      Selects a range of text in the text input control. The range is specified by the anchor and caret position, where anchor defines the start of the selection and caretPosition defines the end of the selection.
      Parameters:
      anchor - the starting index of the text selection.
      caretPosition - the ending index of the text selection.