Class AbstractDateBasedChooserPanel<T extends Date>

    • Field Detail

      • m_Formatter

        protected transient DateFormat m_Formatter
        the formatter for the date.
    • Constructor Detail

      • AbstractDateBasedChooserPanel

        public AbstractDateBasedChooserPanel()
    • Method Detail

      • createFormatter

        protected abstract DateFormat createFormatter()
        Creates an instance of the date formatter to use.
        Returns:
        the formatter
      • getFormatter

        protected DateFormat getFormatter()
        Returns the date formatter in use.
        Returns:
        the formatter
      • fromString

        protected T fromString​(String value)
        Converts the string representation into its object representation.
        Specified by:
        fromString in class AbstractChooserPanel<T extends Date>
        Parameters:
        value - the string value to convert
        Returns:
        the generated object
      • toString

        protected String toString​(Date value)
        Converts the value into its string representation.
        Specified by:
        toString in class AbstractChooserPanel<T extends Date>
        Parameters:
        value - the value to convert
        Returns:
        the generated string
      • isValid

        protected boolean isValid​(String value)
        Checks whether the string value is valid and can be parsed.
        Overrides:
        isValid in class AbstractChooserPanel<T extends Date>
        Parameters:
        value - the value to check
        Returns:
        true if valid
      • getDialogTitle

        protected abstract String getDialogTitle()
        Returns the title for the dialog.
        Returns:
        the dialog
      • createPanel

        protected abstract BasePanel createPanel()
        Creates the panel to display in the dialog.

        Must implement DateProvider.
        Returns:
        the panel
      • convert

        protected abstract T convert​(Date date)
        Converts the date into the appropriate derived type.
        Parameters:
        date - the date to convert
        Returns:
        the converted type
      • doChoose

        protected T doChoose()
        Performs the actual choosing of an object.
        Specified by:
        doChoose in class AbstractChooserPanel<T extends Date>
        Returns:
        the chosen object or null if none chosen