Package jisa.gui

Interface Field<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void editValues​(java.lang.String... values)
      Edits the available set of discrete options for this field, if applicable.
      T get()
      Returns the value currently displayed in this input field.
      java.lang.String getText()
      Returns the text label next to this input field.
      default T getValue()
      Alias for get() for Kotlin property access.
      boolean isDisabled()
      Returns whether this field is currently disabled.
      boolean isVisible()
      Returns whether this field is visible.
      default void loadOtherDefaults​(ConfigBlock block)  
      void remove()
      Removes this input field from its Fields container.
      void set​(T 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.
      default void setValue​(T value)
      Alias for set(T value) for Kotlin property access.
      void setVisible​(boolean visible)
      Sets whether this field should be visible or not.
      default void writeOtherDefaults​(ConfigBlock block)  
    • Method Detail

      • set

        void set​(T value)
        Sets the value displayed in this input field.
        Parameters:
        value - Value to display
      • get

        T get()
        Returns the value currently displayed in this input field.
        Returns:
        Value being displayed
      • getValue

        default T getValue()
        Alias for get() for Kotlin property access.
        Returns:
        Value being displayed
      • setValue

        default void setValue​(T value)
        Alias for set(T value) for Kotlin property access.
        Parameters:
        value - Value to display
      • setOnChange

        void setOnChange​(SRunnable onChange)
        Sets the action to perform when the value of this input field is changed.
        Parameters:
        onChange - What to do on change
      • editValues

        void editValues​(java.lang.String... values)
        Edits the available set of discrete options for this field, if applicable.
        Parameters:
        values - New set of options
      • isDisabled

        boolean isDisabled()
        Returns whether this field is currently disabled.
        Returns:
        Is it disabled
      • setDisabled

        void setDisabled​(boolean disabled)
        Sets whether this field is disabled.
        Parameters:
        disabled - Should it be disabled?
      • isVisible

        boolean isVisible()
        Returns whether this field is visible.
        Specified by:
        isVisible in interface SubElement
        Returns:
        Is it visible?
      • setVisible

        void setVisible​(boolean visible)
        Sets whether this field should be visible or not.
        Specified by:
        setVisible in interface SubElement
        Parameters:
        visible - Visible?
      • remove

        void remove()
        Removes this input field from its Fields container.
        Specified by:
        remove in interface SubElement
      • getText

        java.lang.String getText()
        Returns the text label next to this input field.
        Returns:
        Text label
      • setText

        void setText​(java.lang.String text)
        Sets the text label displayed next to this input field.
        Parameters:
        text - Text to display
      • writeOtherDefaults

        default void writeOtherDefaults​(ConfigBlock block)
      • loadOtherDefaults

        default void loadOtherDefaults​(ConfigBlock block)