Package adams.gui.goe

Class AbstractBaseDateTypeEditor<B extends BaseObject & DateValueSupporter & GrammarSupplier,​P extends DateProvider>

    • Constructor Detail

      • AbstractBaseDateTypeEditor

        public AbstractBaseDateTypeEditor()
    • Method Detail

      • newDateType

        protected B newDateType()
        Returns a new instance of the date type used for parsing.
        Returns:
        the instance
      • newDateType

        protected abstract B newDateType​(String s)
        Returns a new instance of the date type.
        Parameters:
        s - the string to instantiate with, can be null
        Returns:
        the instance
      • newDateType

        protected abstract B newDateType​(Date d)
        Returns a new instance of the date type.
        Parameters:
        d - the date to initialize with
        Returns:
        the instance
      • newPanel

        protected abstract P newPanel()
        Instantiates a new panel for picking the date type.
        Returns:
        the panel
      • getPlaceholder

        protected abstract String getPlaceholder​(AbstractBaseDateTypeEditor.Placeholder ph)
        Returns the string equivalent of the placeholder.
        Parameters:
        ph - the placeholder to get the string representation for
        Returns:
        the string representation
      • getNowButtonText

        protected abstract String getNowButtonText()
        Returns the text to use for the "now" button.
        Returns:
        the button text
      • updateButtons

        protected void updateButtons()
        Sets the enabled state of the buttons.
      • showHelp

        protected void showHelp()
        Displays the help for the
      • 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