Class DefaultCategory
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.jfreechart.dataset.AbstractDatasetGenerator<org.jfree.data.category.DefaultCategoryDataset>
-
- adams.gui.visualization.jfreechart.dataset.DefaultCategory
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Serializable
public class DefaultCategory extends AbstractDatasetGenerator<org.jfree.data.category.DefaultCategoryDataset>
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 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 DefaultCategory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.category.DefaultCategoryDataset
doAddSeries(org.jfree.data.general.Dataset dataset, SpreadSheet data)
Performs the actual addition of the series to the dataset.protected org.jfree.data.category.DefaultCategoryDataset
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.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
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.
-
-
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.
-
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.category.DefaultCategoryDataset>
- Returns:
- the dataset class
-
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.category.DefaultCategoryDataset>
- Returns:
- null if no info available, otherwise short string
-
check
protected String check(SpreadSheet data)
Hook method for checks before generating the dataset.- Overrides:
check
in classAbstractDatasetGenerator<org.jfree.data.category.DefaultCategoryDataset>
- Parameters:
data
- the data to use- Returns:
- null if checks passed, otherwise error message
-
doGenerate
protected org.jfree.data.category.DefaultCategoryDataset doGenerate(SpreadSheet data)
Performs the actual generation of the dataset.- Specified by:
doGenerate
in classAbstractDatasetGenerator<org.jfree.data.category.DefaultCategoryDataset>
- Parameters:
data
- the data to use- Returns:
- the dataset
-
doAddSeries
protected org.jfree.data.category.DefaultCategoryDataset 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.category.DefaultCategoryDataset>
- Parameters:
dataset
- the dataset to add the series todata
- the data to use- Returns:
- the updated dataset
-
-