Class AbstractOutputGenerator<T extends AbstractResultItem>

    • 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,
                                                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