Class AbstractXYChartGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.tools.spreadsheetviewer.chart.AbstractChartGenerator
-
- adams.gui.tools.spreadsheetviewer.chart.AbstractRowBasedChartGenerator
-
- adams.gui.tools.spreadsheetviewer.chart.AbstractXYChartGenerator
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,ColorProviderHandler
,Serializable
- Direct Known Subclasses:
BarPlot
,LinePlot
,ScatterPlot
public abstract class AbstractXYChartGenerator extends AbstractRowBasedChartGenerator implements ColorProviderHandler
Ancestor for X/Y (or just Y) plot generators.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ColorProvider
m_ColorProvider
the color provider to use.protected SpreadSheetColumnIndex
m_XColumn
the column to use as X value.protected SpreadSheetColumnRange
m_YColumns
the columns to use as Y values.-
Fields inherited from class adams.gui.tools.spreadsheetviewer.chart.AbstractRowBasedChartGenerator
m_RowFinder
-
Fields inherited from class adams.gui.tools.spreadsheetviewer.chart.AbstractChartGenerator
m_Height, m_Width, STORAGE_NAME
-
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 AbstractXYChartGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
check(String name, SpreadSheet sheet)
Checks whether the spreadsheet can be processed.String
colorProviderTipText()
Returns the tip text for this property.protected SpreadSheetPlotGenerator
configureGenerator(SpreadSheet sheet)
Configures the plot generator.protected void
configureSequencePlotter(SpreadSheet sheet, SequencePlotter plotter)
Configures the sequence plotter.void
defineOptions()
Adds options to the internal list of options.ColorProvider
getColorProvider()
Returns the color provider in use.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.protected String
getXAxisLabel(SpreadSheet sheet)
Returns the label for the X axis.String
getXColumn()
Returns the index of the column which values to use as X values.protected String
getYAxisLabel(SpreadSheet sheet)
Returns the label for the X axis.String
getYColumns()
Returns the current Y column range to use in the chart.protected void
initialize()
Initializes the members.void
setColorProvider(ColorProvider value)
Sets the color provider to use.void
setXColumn(String value)
Sets the index of the column which values to use as X values.void
setYColumns(String value)
Sets the Y column range to use in the chart.String
XColumnTipText()
Returns the tip text for this property.String
YColumnsTipText()
Returns the tip text for this property.-
Methods inherited from class adams.gui.tools.spreadsheetviewer.chart.AbstractRowBasedChartGenerator
addChartGeneration, getRowFinder, rowFinderTipText, setRowFinder
-
Methods inherited from class adams.gui.tools.spreadsheetviewer.chart.AbstractChartGenerator
columnTypesToAxisType, columnTypesToTickGenerator, columnTypeToAxisType, columnTypeToTickGenerator, doGenerate, generate, getDefaultHeight, getDefaultWidth, getHeight, getWidth, heightTipText, setHeight, setWidth, widthTipText
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, 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_XColumn
protected SpreadSheetColumnIndex m_XColumn
the column to use as X value.
-
m_YColumns
protected SpreadSheetColumnRange m_YColumns
the columns to use as Y values.
-
m_ColorProvider
protected ColorProvider m_ColorProvider
the color provider to use.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractRowBasedChartGenerator
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classAbstractOptionHandler
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractChartGenerator
- Returns:
- null if no info available, otherwise short string
-
setXColumn
public void setXColumn(String value)
Sets the index of the column which values to use as X values.- Parameters:
value
- the column index
-
getXColumn
public String getXColumn()
Returns the index of the column which values to use as X values.- Returns:
- the column index
-
XColumnTipText
public String XColumnTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setYColumns
public void setYColumns(String value)
Sets the Y column range to use in the chart.- Parameters:
value
- the column range
-
getYColumns
public String getYColumns()
Returns the current Y column range to use in the chart.- Returns:
- the column range
-
YColumnsTipText
public String YColumnsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColorProvider
public void setColorProvider(ColorProvider value)
Sets the color provider to use.- Specified by:
setColorProvider
in interfaceColorProviderHandler
- Parameters:
value
- the color provider
-
getColorProvider
public ColorProvider getColorProvider()
Returns the color provider in use.- Specified by:
getColorProvider
in interfaceColorProviderHandler
- Returns:
- the color provider
-
colorProviderTipText
public String colorProviderTipText()
Returns the tip text for this property.- Specified by:
colorProviderTipText
in interfaceColorProviderHandler
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
check
protected void check(String name, SpreadSheet sheet)
Checks whether the spreadsheet can be processed.
Default implementation only ensures that data is present.- Overrides:
check
in classAbstractChartGenerator
- Parameters:
name
- the name of the tab/sheetsheet
- the spreadsheet to check
-
configureGenerator
protected SpreadSheetPlotGenerator configureGenerator(SpreadSheet sheet)
Configures the plot generator.- Parameters:
sheet
- the sheet to use as basis- Returns:
- the plot generator
-
getXAxisLabel
protected String getXAxisLabel(SpreadSheet sheet)
Returns the label for the X axis.- Parameters:
sheet
- the sheet to get the column name from- Returns:
- the label
-
getYAxisLabel
protected String getYAxisLabel(SpreadSheet sheet)
Returns the label for the X axis.- Parameters:
sheet
- the sheet to get the column name from- Returns:
- the label
-
configureSequencePlotter
protected void configureSequencePlotter(SpreadSheet sheet, SequencePlotter plotter)
Configures the sequence plotter.- Parameters:
sheet
- the sheet to useplotter
- the plotter instance to configure
-
-