Class AbstractChartGenerator<T extends org.jfree.data.general.Dataset>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.jfreechart.chart.AbstractChartGenerator<T>
-
- Type Parameters:
T- the type of dataset
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,Serializable
- Direct Known Subclasses:
AbstractChartGeneratorWithAxisLabels,FlowPlot
public abstract class AbstractChartGenerator<T extends org.jfree.data.general.Dataset> extends AbstractOptionHandler implements QuickInfoSupporter
Ancestor for chart generators.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_Legendwhether to show the legend.protected Stringm_Titlethe title of the chart.protected booleanm_ToolTipswhether to show tool tips.-
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 AbstractChartGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Stringcheck(T data)Hook method for checks before generating the chart.voiddefineOptions()Adds options to the internal list of options.protected abstract org.jfree.chart.JFreeChartdoGenerate(T data)Performs the actual generation of the chart.org.jfree.chart.JFreeChartgenerate(T data)Generates the chart.booleangetLegend()Returns whether the legend is displayed.StringgetQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.StringgetTitle()Returns the title for the plot.booleangetToolTips()Returns whether the tool tips are displayed.StringlegendTipText()Returns the tip text for this property.voidsetLegend(boolean value)Sets whether the legend is displayed..voidsetTitle(String value)Sets the title for the plot.voidsetToolTips(boolean value)Sets whether the tool tips are displayed..StringtitleTipText()Returns the tip text for this property.StringtoolTipsTipText()Returns the tip text for this property.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, 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
-
-
-
-
Field Detail
-
m_Title
protected String m_Title
the title of the chart.
-
m_Legend
protected boolean m_Legend
whether to show the legend.
-
m_ToolTips
protected boolean m_ToolTips
whether to show tool tips.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
setTitle
public void setTitle(String value)
Sets the title for the plot.- Parameters:
value- the title
-
getTitle
public String getTitle()
Returns the title for the plot.- Returns:
- the title
-
titleTipText
public String titleTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setLegend
public void setLegend(boolean value)
Sets whether the legend is displayed..- Parameters:
value- true if displayed
-
getLegend
public boolean getLegend()
Returns whether the legend is displayed.- Returns:
- true if displayed
-
legendTipText
public String legendTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setToolTips
public void setToolTips(boolean value)
Sets whether the tool tips are displayed..- Parameters:
value- true if displayed
-
getToolTips
public boolean getToolTips()
Returns whether the tool tips are displayed.- Returns:
- true if displayed
-
toolTipsTipText
public String toolTipsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Returns:
- null if no info available, otherwise short string
-
check
protected String check(T data)
Hook method for checks before generating the chart.- Parameters:
data- the data to use- Returns:
- null if checks passed, otherwise error message
-
doGenerate
protected abstract org.jfree.chart.JFreeChart doGenerate(T data)
Performs the actual generation of the chart.- Parameters:
data- the data to use- Returns:
- the chart
-
generate
public org.jfree.chart.JFreeChart generate(T data)
Generates the chart.- Parameters:
data- the data to use- Returns:
- the chart
-
-