Package adams.gui.goe

Class RangeEditor

    • Field Detail

      • m_TextValue

        protected BaseTextField m_TextValue
        The text field with the value.
      • m_PanelValue

        protected JPanel m_PanelValue
        the panel with the text value (border indicates validity).
      • m_ButtonHelp

        protected BaseButton m_ButtonHelp
        the help button for bringing up a dialog with the example text.
      • m_DefaultBackground

        protected Color m_DefaultBackground
        the default background color of the panel.
    • Constructor Detail

      • RangeEditor

        public RangeEditor()
    • Method Detail

      • parse

        protected Range parse​(String s)
        Parses the given string and returns the generated object. The string has to be a valid one, i.e., the isValid(String) check has been performed already and succeeded.
        Parameters:
        s - the string to parse
        Returns:
        the generated object, or null in case of an error
      • isValid

        protected boolean isValid​(String s)
        Checks whether the string is valid.
        Parameters:
        s - the string to check
        Returns:
        true if the string is valid
      • isUnchanged

        protected boolean isUnchanged​(String s)
        Checks whether the string is the same as the currently used one.
        Parameters:
        s - the string to check
        Returns:
        true if the strings are the same
      • acceptInput

        protected void acceptInput()
        Accepts the input and closes the dialog.
      • discardInput

        protected void discardInput()
        Discards the input and closes the dialog.
      • isInlineEditingAvailable

        public boolean isInlineEditingAvailable()
        Checks whether inline editing is available.
        Specified by:
        isInlineEditingAvailable in interface InlineEditorSupport
        Returns:
        true if editing available
      • isInlineValueValid

        public boolean isInlineValueValid​(String value)
        Checks whether the value id valid.
        Specified by:
        isInlineValueValid in interface InlineEditorSupport
        Parameters:
        value - the value to check
        Returns:
        true if valid
      • indicateValidity

        protected void indicateValidity()
        Updates the color of the border, indicating with RED if the input is invalid.