Class XYDatasetGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.xchart.dataset.AbstractDatasetGenerator<XYDataset>
-
- adams.gui.visualization.xchart.dataset.XYDatasetGenerator
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,Serializable
public class XYDatasetGenerator extends AbstractDatasetGenerator<XYDataset>
For each of the Y columns, a separate series is generated. The column name is used as name for each series.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_AddDiagonalSerieswhether to add an additional series for a diagonal to the dataset.protected SpreadSheetColumnIndexm_Xthe X column.protected SpreadSheetColumnRangem_Ythe Y columns.-
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 XYDatasetGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringaddDiagonalSeriesTipText()Returns the tip text for this property.protected Stringcheck(SpreadSheet data)Hook method for checks before generating the dataset.voiddefineOptions()Adds options to the internal list of options.protected Datasets<XYDataset>doGenerate(SpreadSheet data)Performs the actual generation of the dataset.Class<? extends Dataset>generates()Returns the class of dataset that it generates.booleangetAddDiagonalSeries()Returns whether to add an additional series for the diagonal to the data.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.SpreadSheetColumnIndexgetX()Returns the index of the column to act as X axis.SpreadSheetColumnRangegetY()Returns the range of columns to use as Y.StringglobalInfo()Returns a string describing the object.voidsetAddDiagonalSeries(boolean value)Sets whether to add an additional series for the diagonal to the data.voidsetX(SpreadSheetColumnIndex value)Sets the index of the column to act as X axis.voidsetY(SpreadSheetColumnRange value)Sets the range of columns to use as Y.StringXTipText()Returns the tip text for this property.StringYTipText()Returns the tip text for this property.-
Methods inherited from class adams.gui.visualization.xchart.dataset.AbstractDatasetGenerator
generate
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, 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_X
protected SpreadSheetColumnIndex m_X
the X column.
-
m_Y
protected SpreadSheetColumnRange m_Y
the Y columns.
-
m_AddDiagonalSeries
protected boolean m_AddDiagonalSeries
whether to add an additional series for a diagonal to the dataset.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
setX
public void setX(SpreadSheetColumnIndex value)
Sets the index of the column to act as X axis. If left empty, the row index is used instead.- Parameters:
value- the index
-
getX
public SpreadSheetColumnIndex getX()
Returns the index of the column to act as X axis. If left empty, the row index is used instead.- Returns:
- the index
-
XTipText
public String XTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setY
public void setY(SpreadSheetColumnRange value)
Sets the range of columns to use as Y.- Parameters:
value- the range
-
getY
public SpreadSheetColumnRange getY()
Returns the range of columns to use as Y.- Returns:
- the range
-
YTipText
public String YTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setAddDiagonalSeries
public void setAddDiagonalSeries(boolean value)
Sets whether to add an additional series for the diagonal to the data.- Parameters:
value- true if to add
-
getAddDiagonalSeries
public boolean getAddDiagonalSeries()
Returns whether to add an additional series for the diagonal to the data.- Returns:
- true if to add
-
addDiagonalSeriesTipText
public String addDiagonalSeriesTipText()
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 actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractDatasetGenerator<XYDataset>- Returns:
- null if no info available, otherwise short string
-
generates
public Class<? extends Dataset> generates()
Returns the class of dataset that it generates.- Specified by:
generatesin classAbstractDatasetGenerator<XYDataset>- Returns:
- the dataset class
-
check
protected String check(SpreadSheet data)
Hook method for checks before generating the dataset.- Overrides:
checkin classAbstractDatasetGenerator<XYDataset>- Parameters:
data- the data to use- Returns:
- null if checks passed, otherwise error message
-
doGenerate
protected Datasets<XYDataset> doGenerate(SpreadSheet data)
Performs the actual generation of the dataset.- Specified by:
doGeneratein classAbstractDatasetGenerator<XYDataset>- Parameters:
data- the data to use- Returns:
- the dataset
-
-