Class AbstractOutputGenerator<T extends AbstractResultItem>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.tools.wekainvestigator.output.AbstractOutputGenerator<T>
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.SizeOfHandler
,Serializable
- Direct Known Subclasses:
AbstractOutputGenerator
,AbstractOutputGenerator
,AbstractOutputGenerator
,AbstractOutputGenerator
,AbstractOutputGenerator
public abstract class AbstractOutputGenerator<T extends AbstractResultItem> extends adams.core.option.AbstractOptionHandler
Ancestor for output generators.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractOutputGenerator()
-
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 theResultItem
.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
-
-
-
-
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 tocomp
- 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 forerrors
- 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 theResultItem
.- Parameters:
item
- the item to add the output to- Returns:
- null if output could be generated, otherwise error message
-
-