Class AbstractOutputGenerator<T extends AbstractResultItem>

    • Field Summary

      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addTab​(T item, JComponent comp)
      Adds the component as tab to the result item.
      abstract boolean canGenerateOutput​(T item)
      Checks whether output can be generated from this item.
      abstract JComponent createOutput​(T item, adams.core.MessageCollection errors)
      Generates output from the item.
      String generateOutput​(T item)
      Generates output and adds it to the ResultItem.
      abstract String getTitle()
      The title to use for the tab.
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
    • Constructor Detail

      • AbstractOutputGenerator

        public AbstractOutputGenerator()
    • Method Detail

      • addTab

        protected void addTab​(T item,
                              JComponent comp)
        Adds the component as tab to the result item.
        Parameters:
        item - the result item to add to
        comp - the component to add
      • getTitle

        public abstract String getTitle()
        The title to use for the tab.
        Returns:
        the title
      • canGenerateOutput

        public abstract boolean canGenerateOutput​(T item)
        Checks whether output can be generated from this item.
        Parameters:
        item - the item to check
        Returns:
        true if output can be generated
      • createOutput

        public abstract JComponent createOutput​(T item,
                                                adams.core.MessageCollection errors)
        Generates output from the item.
        Parameters:
        item - the item to generate output for
        errors - for collecting error messages
        Returns:
        the output component, null if failed to generate
      • generateOutput

        public String generateOutput​(T item)
        Generates output and adds it to the ResultItem.
        Parameters:
        item - the item to add the output to
        Returns:
        null if output could be generated, otherwise error message