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:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
AbstractOutputGenerator
,AbstractOutputGenerator
,AbstractOutputGenerator
,AbstractOutputGenerator
,AbstractOutputGenerator
public abstract class AbstractOutputGenerator<T extends AbstractResultItem> extends AbstractOptionHandler
Ancestor for output generators.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
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
-
-
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, 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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
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, 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
-
-