Class FxInput<W extends javafx.scene.layout.Region,​V>

    • Constructor Detail

      • FxInput

        public FxInput​(W widget)
        The constructor.
        Parameters:
        widget - the JavaFx widget.
    • Method Detail

      • setName

        public void setName​(String name)
        Specified by:
        setName in interface UiAbstractInput<W extends javafx.scene.layout.Region>
        Parameters:
        name - the new name. Prevents lazy initialization of the name widget.
      • hasNameWidget

        public boolean hasNameWidget()
        Specified by:
        hasNameWidget in interface UiInput<W extends javafx.scene.layout.Region>
        Returns:
        true if the name widget has already been created, false otherwise. Helpful to avoid unintended lazy initialization.
      • getNameWidget

        public FxLabel getNameWidget()
        Specified by:
        getNameWidget in interface UiInput<W extends javafx.scene.layout.Region>
        Returns:
        the UiLabel of this input. May be lazily created on the first call of this method to avoid unnecessary overhead (e.g. if a UiInput is used for inline editing).
      • hasContainerWidget

        public boolean hasContainerWidget()
        Specified by:
        hasContainerWidget in interface UiInput<W extends javafx.scene.layout.Region>
        Returns:
        true if the container widget has already been created, false otherwise. Helpful to avoid unintended lazy initialization.
      • getHBox

        protected javafx.scene.layout.HBox getHBox()
        Returns:
        the HBox used as top widget. Will be lazily initialized on the first call of this method.
      • initHBox

        protected void initHBox​(javafx.scene.layout.HBox box)
        Parameters:
        box - the HBox used as top widget.
      • getPrefix

        public String getPrefix()
        Specified by:
        getPrefix in interface AttributeWritePrefix
        Returns:
        the optional prefix text shown in front of the actual input (e.g. for a currency like $ or £). Will be null if not set.
      • getPrefixLabel

        protected javafx.scene.control.Label getPrefixLabel()
        Returns:
        the Label for the prefix.
      • getSuffix

        public String getSuffix()
        Specified by:
        getSuffix in interface AttributeWriteSuffix
        Returns:
        the optional suffix text shown after of the actual input (e.g. for a unit, currencies like €, etc.). Will be null if not set.
      • getSuffixLabel

        protected javafx.scene.control.Label getSuffixLabel()
        Returns:
        the Label for the suffix.
      • setMandatory

        protected void setMandatory​(boolean mandatory)
        Overrides:
        setMandatory in class FxActiveValidatableWidget<W extends javafx.scene.layout.Region,​V>
        Parameters:
        mandatory - the new mandatory (required) flag.
      • setValueNative

        protected abstract void setValueNative​(V value)
        Specified by:
        setValueNative in class FxActiveValidatableWidget<W extends javafx.scene.layout.Region,​V>
        Parameters:
        value - the new value to set in the native widget.