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 ColorProviderm_ColorProviderthe color provider to use.protected SpreadSheetColumnIndexm_XColumnthe column to use as X value.protected SpreadSheetColumnRangem_YColumnsthe 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 voidcheck(String name, SpreadSheet sheet)Checks whether the spreadsheet can be processed.StringcolorProviderTipText()Returns the tip text for this property.protected SpreadSheetPlotGeneratorconfigureGenerator(SpreadSheet sheet)Configures the plot generator.protected voidconfigureSequencePlotter(SpreadSheet sheet, SequencePlotter plotter)Configures the sequence plotter.voiddefineOptions()Adds options to the internal list of options.ColorProvidergetColorProvider()Returns the color provider in use.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.protected StringgetXAxisLabel(SpreadSheet sheet)Returns the label for the X axis.StringgetXColumn()Returns the index of the column which values to use as X values.protected StringgetYAxisLabel(SpreadSheet sheet)Returns the label for the X axis.StringgetYColumns()Returns the current Y column range to use in the chart.protected voidinitialize()Initializes the members.voidsetColorProvider(ColorProvider value)Sets the color provider to use.voidsetXColumn(String value)Sets the index of the column which values to use as X values.voidsetYColumns(String value)Sets the Y column range to use in the chart.StringXColumnTipText()Returns the tip text for this property.StringYColumnsTipText()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:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractRowBasedChartGenerator
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classAbstractOptionHandler
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin 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:
setColorProviderin interfaceColorProviderHandler- Parameters:
value- the color provider
-
getColorProvider
public ColorProvider getColorProvider()
Returns the color provider in use.- Specified by:
getColorProviderin interfaceColorProviderHandler- Returns:
- the color provider
-
colorProviderTipText
public String colorProviderTipText()
Returns the tip text for this property.- Specified by:
colorProviderTipTextin 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:
checkin 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
-
-