Class DefaultXY
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.jfreechart.dataset.AbstractDatasetGenerator<org.jfree.data.xy.DefaultXYDataset>
-
- adams.gui.visualization.jfreechart.dataset.DefaultXY
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Serializable
public class DefaultXY extends AbstractDatasetGenerator<org.jfree.data.xy.DefaultXYDataset>
GeneratesDefaultXYDataset
datasets.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_AddDiagonalSeries
whether to add an additional series for a diagonal to the dataset.protected SpreadSheetColumnIndex
m_X
the X column.protected SpreadSheetColumnRange
m_Y
the 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 DefaultXY()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
addDiagonalSeriesTipText()
Returns the tip text for this property.protected String
check(SpreadSheet data)
Hook method for checks before generating the dataset.void
defineOptions()
Adds options to the internal list of options.protected org.jfree.data.xy.DefaultXYDataset
doAddSeries(org.jfree.data.general.Dataset dataset, SpreadSheet data)
Performs the actual addition of the series to the dataset.protected org.jfree.data.xy.DefaultXYDataset
doGenerate(SpreadSheet data)
Performs the actual generation of the dataset.Class<? extends org.jfree.data.general.Dataset>
generates()
Returns the class of dataset that it generates.boolean
getAddDiagonalSeries()
Returns whether to add an additional series for the diagonal to the data.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.SpreadSheetColumnIndex
getX()
Returns the index of the column to act as X axis.SpreadSheetColumnRange
getY()
Returns the range of columns to use as Y.String
globalInfo()
Returns a string describing the object.void
setAddDiagonalSeries(boolean value)
Sets whether to add an additional series for the diagonal to the data.void
setX(SpreadSheetColumnIndex value)
Sets the index of the column to act as X axis.void
setY(SpreadSheetColumnRange value)
Sets the range of columns to use as Y.String
XTipText()
Returns the tip text for this property.String
YTipText()
Returns the tip text for this property.-
Methods inherited from class adams.gui.visualization.jfreechart.dataset.AbstractDatasetGenerator
addSeries, checkAddSeries, 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:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in 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:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractDatasetGenerator<org.jfree.data.xy.DefaultXYDataset>
- Returns:
- null if no info available, otherwise short string
-
generates
public Class<? extends org.jfree.data.general.Dataset> generates()
Returns the class of dataset that it generates.- Specified by:
generates
in classAbstractDatasetGenerator<org.jfree.data.xy.DefaultXYDataset>
- Returns:
- the dataset class
-
check
protected String check(SpreadSheet data)
Hook method for checks before generating the dataset.- Overrides:
check
in classAbstractDatasetGenerator<org.jfree.data.xy.DefaultXYDataset>
- Parameters:
data
- the data to use- Returns:
- null if checks passed, otherwise error message
-
doGenerate
protected org.jfree.data.xy.DefaultXYDataset doGenerate(SpreadSheet data)
Performs the actual generation of the dataset.- Specified by:
doGenerate
in classAbstractDatasetGenerator<org.jfree.data.xy.DefaultXYDataset>
- Parameters:
data
- the data to use- Returns:
- the dataset
-
doAddSeries
protected org.jfree.data.xy.DefaultXYDataset doAddSeries(org.jfree.data.general.Dataset dataset, SpreadSheet data)
Performs the actual addition of the series to the dataset.- Specified by:
doAddSeries
in classAbstractDatasetGenerator<org.jfree.data.xy.DefaultXYDataset>
- Parameters:
dataset
- the dataset to add the series todata
- the data to use- Returns:
- the dataset
-
-