Class StringField

  • All Implemented Interfaces:
    Field<java.lang.String>, SubElement

    public abstract class StringField
    extends java.lang.Object
    implements Field<java.lang.String>
    • Constructor Summary

      Constructors 
      Constructor Description
      StringField​(javafx.scene.control.Label label, javafx.scene.control.TextField field)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void editValues​(java.lang.String... values)
      Edits the available set of discrete options for this field, if applicable.
      java.lang.String get()
      Returns the value currently displayed in this input field.
      java.lang.String getText()
      Returns the text label next to this input field.
      boolean isDisabled()
      Returns whether this field is currently disabled.
      boolean isVisible()
      Returns whether this field is visible.
      abstract void remove()
      Removes this input field from its Fields container.
      void set​(java.lang.String value)
      Sets the value displayed in this input field.
      void setDisabled​(boolean disabled)
      Sets whether this field is disabled.
      void setOnChange​(SRunnable onChange)
      Sets the action to perform when the value of this input field is changed.
      void setText​(java.lang.String text)
      Sets the text label displayed next to this input field.
      void setVisible​(boolean visible)
      Sets whether this field should be visible or not.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StringField

        public StringField​(javafx.scene.control.Label label,
                           javafx.scene.control.TextField field)
    • Method Detail

      • set

        public void set​(java.lang.String value)
        Description copied from interface: Field
        Sets the value displayed in this input field.
        Specified by:
        set in interface Field<java.lang.String>
        Parameters:
        value - Value to display
      • get

        public java.lang.String get()
        Description copied from interface: Field
        Returns the value currently displayed in this input field.
        Specified by:
        get in interface Field<java.lang.String>
        Returns:
        Value being displayed
      • setOnChange

        public void setOnChange​(SRunnable onChange)
        Description copied from interface: Field
        Sets the action to perform when the value of this input field is changed.
        Specified by:
        setOnChange in interface Field<java.lang.String>
        Parameters:
        onChange - What to do on change
      • editValues

        public void editValues​(java.lang.String... values)
        Description copied from interface: Field
        Edits the available set of discrete options for this field, if applicable.
        Specified by:
        editValues in interface Field<java.lang.String>
        Parameters:
        values - New set of options
      • isDisabled

        public boolean isDisabled()
        Description copied from interface: Field
        Returns whether this field is currently disabled.
        Specified by:
        isDisabled in interface Field<java.lang.String>
        Returns:
        Is it disabled
      • isVisible

        public boolean isVisible()
        Description copied from interface: Field
        Returns whether this field is visible.
        Specified by:
        isVisible in interface Field<java.lang.String>
        Specified by:
        isVisible in interface SubElement
        Returns:
        Is it visible?
      • remove

        public abstract void remove()
        Description copied from interface: Field
        Removes this input field from its Fields container.
        Specified by:
        remove in interface Field<java.lang.String>
        Specified by:
        remove in interface SubElement
      • getText

        public java.lang.String getText()
        Description copied from interface: Field
        Returns the text label next to this input field.
        Specified by:
        getText in interface Field<java.lang.String>
        Returns:
        Text label
      • setVisible

        public void setVisible​(boolean visible)
        Description copied from interface: Field
        Sets whether this field should be visible or not.
        Specified by:
        setVisible in interface Field<java.lang.String>
        Specified by:
        setVisible in interface SubElement
        Parameters:
        visible - Visible?
      • setText

        public void setText​(java.lang.String text)
        Description copied from interface: Field
        Sets the text label displayed next to this input field.
        Specified by:
        setText in interface Field<java.lang.String>
        Parameters:
        text - Text to display
      • setDisabled

        public void setDisabled​(boolean disabled)
        Description copied from interface: Field
        Sets whether this field is disabled.
        Specified by:
        setDisabled in interface Field<java.lang.String>
        Parameters:
        disabled - Should it be disabled?