Class TvmTextualInput<V>

    • Constructor Detail

      • TvmTextualInput

        public TvmTextualInput​(String type)
        The constructor.
        Parameters:
        type - the type of the input.
      • TvmTextualInput

        public TvmTextualInput​(org.teavm.jso.dom.html.HTMLInputElement widget)
        The constructor.
        Parameters:
        widget - the TeaVM widget.
    • Method Detail

      • getText

        public String getText()
        Specified by:
        getText in interface AttributeWriteText
        Returns:
        the label or text of this widget. Will be the empty string if no text has been set. If used as label the text is permanently displayed as information for the user to describe its meaning (lettering for button or label). Otherwise for textual inputs the text is the plain value as text entered by the end-user. If the value type is not String (e.g. for UiComboBox) this gives direct access to the plain text entered by the end-user (even in case it is not a valid option). This can be useful in a combo-box in case value is undefined to accept the text as a new option (e.g. for a tag).
      • getPlaceholder

        public String getPlaceholder()
        Specified by:
        getPlaceholder in interface AttributeWritePlaceholder
        Returns:
        the placeholder text that is displayed if the input text field is blank. Will be the empty string if not set.