Class CategoryDataSetCollection
java.lang.Object
org.jfree.data.general.AbstractDataset
com.illumon.iris.db.plot.datasets.AbstractDataSetCollection<CategoryDataSeriesInternal>
com.illumon.iris.db.plot.datasets.category.CategoryDataSetCollection
- All Implemented Interfaces:
DataSetCollection<CategoryDataSeriesInternal>
,LabeledDataSetCollection
,PlotExceptionCause
,DataChangeListener
,ObjectInputValidation
,Serializable
,Cloneable
,org.jfree.data.category.CategoryDataset
,org.jfree.data.general.Dataset
,org.jfree.data.KeyedValues2D
,org.jfree.data.Values2D
- Direct Known Subclasses:
TransformedCategoryDataSetCollection
public class CategoryDataSetCollection extends AbstractDataSetCollection<CategoryDataSeriesInternal> implements org.jfree.data.category.CategoryDataset, LabeledDataSetCollection
Collection of categorical datasets.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.db.plot.datasets.AbstractDataSetCollection
AbstractDataSetCollection.FireDatasetChangeListener
-
Field Summary
Fields Modifier and Type Field Description static String
CAT_SERIES_ORDER_COLUMN
-
Constructor Summary
Constructors Constructor Description CategoryDataSetCollection(AxesImpl axes, LambdaGovernor governor, DynamicSeriesNamer dynamicSeriesNamer, CategoryIndex categoryIndex, PlotInfo plotInfo, boolean notifyDataChanged)
Creates an instance of CategoryDataSetCollection. -
Method Summary
Modifier and Type Method Description void
constructSnapshot()
Constructs a snapshot of this dataset collection.List<CategoryDataSeriesInternal>
getAllSeries()
Paint
getColor(int row, int col)
Gets thePaint
for the specified data pointint
getColumnCount()
int
getColumnIndex(Comparable category)
Comparable
getColumnKey(int category)
List
getColumnKeys()
CategoryDataSetCollection
getCurrentSnapshot()
Returns a snapshot of this dataset collection in which no series which will update.Number
getEndY(int row, int column)
Number
getEndY(Comparable series, Comparable category)
String
getLabel(int row, int col)
Gets the label for the specified data pointShape
getPointShape(int row, int col)
Gets the point shape for the specified data pointDouble
getPointSize(int row, int col)
Gets the point size for the specified data pointint
getRowCount()
int
getRowIndex(Comparable series)
Comparable
getRowKey(int series)
List
getRowKeys()
Number
getStartY(int row, int column)
Number
getStartY(Comparable series, Comparable category)
Number
getValue(int row, int column)
Number
getValue(Comparable series, Comparable category)
org.jfree.data.Range
getYRange()
void
notifyDataChanged(RunnableFuture callback)
Notifies this listener that the underlying data has changed.void
notifySeriesChanged(boolean incremental)
Notifies this listener that the underlying data has a new series.void
onOneClick()
If we are not being removed on a one click; tell us about it anyway.protected void
reindexSeriesSync(boolean incremental, boolean onlyIfGuiClient, boolean notify)
Methods inherited from class com.illumon.iris.db.plot.datasets.AbstractDataSetCollection
add, add, addFireDatasetChangeListener, addMultiSeries, addSeries, axes, dimension, fireDatasetChanged, get, getDynamicSeriesNamer, getGovernor, getPlotInfo, getSeriesNames, id, isNotifyDataChanged, multiSeries, notifyDataChanged, remove, removeFireDatasetChangeListener, series, setSnapshotsEnabled, testIfSwingDispatchThreadIfNotTestMode
Methods inherited from class org.jfree.data.general.AbstractDataset
addChangeListener, clone, getGroup, getNotify, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObject
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.plot.util.tables.DataChangeListener
onFailed, onOneClickRemoved, removeOnOneClick
-
Field Details
-
CAT_SERIES_ORDER_COLUMN
- See Also:
- Constant Field Values
-
-
Constructor Details
-
CategoryDataSetCollection
public CategoryDataSetCollection(AxesImpl axes, LambdaGovernor governor, DynamicSeriesNamer dynamicSeriesNamer, CategoryIndex categoryIndex, PlotInfo plotInfo, boolean notifyDataChanged)Creates an instance of CategoryDataSetCollection.Jobs such as fireDatasetChanged are scheduled by the
governor
.Categories are shared across CategoryDataSetCollections via the
categoryIndex
. This must be used if multiple CategoryDataSetCollections share the same discrete axis.- Parameters:
axes
- corresponding axes for datasetcollectiongovernor
- schedules tasksdynamicSeriesNamer
- utility to name dynamically generated seriescategoryIndex
- holds all categoriesplotInfo
- plot informationnotifyDataChanged
-
-
-
Method Details
-
onOneClick
public void onOneClick()Description copied from interface:DataChangeListener
If we are not being removed on a one click; tell us about it anyway.- Specified by:
onOneClick
in interfaceDataChangeListener
-
reindexSeriesSync
protected void reindexSeriesSync(boolean incremental, boolean onlyIfGuiClient, boolean notify)- Overrides:
reindexSeriesSync
in classAbstractDataSetCollection<CategoryDataSeriesInternal>
-
notifyDataChanged
Description copied from interface:DataChangeListener
Notifies this listener that the underlying data has changed.- Specified by:
notifyDataChanged
in interfaceDataChangeListener
- Overrides:
notifyDataChanged
in classAbstractDataSetCollection<CategoryDataSeriesInternal>
- Parameters:
callback
- to call once done
-
notifySeriesChanged
public void notifySeriesChanged(boolean incremental)Description copied from interface:DataChangeListener
Notifies this listener that the underlying data has a new series.- Specified by:
notifySeriesChanged
in interfaceDataChangeListener
- Overrides:
notifySeriesChanged
in classAbstractDataSetCollection<CategoryDataSeriesInternal>
- Parameters:
incremental
- whether the series change is additive
-
constructSnapshot
public void constructSnapshot()Description copied from interface:DataSetCollection
Constructs a snapshot of this dataset collection.- Specified by:
constructSnapshot
in interfaceDataSetCollection<CategoryDataSeriesInternal>
-
getAllSeries
- Specified by:
getAllSeries
in interfaceDataSetCollection<CategoryDataSeriesInternal>
- Overrides:
getAllSeries
in classAbstractDataSetCollection<CategoryDataSeriesInternal>
- Returns:
- all series from this collection
-
getCurrentSnapshot
Description copied from interface:DataSetCollection
Returns a snapshot of this dataset collection in which no series which will update.- Specified by:
getCurrentSnapshot
in interfaceDataSetCollection<CategoryDataSeriesInternal>
-
getRowKey
- Specified by:
getRowKey
in interfaceorg.jfree.data.KeyedValues2D
-
getRowIndex
- Specified by:
getRowIndex
in interfaceorg.jfree.data.KeyedValues2D
-
getRowKeys
- Specified by:
getRowKeys
in interfaceorg.jfree.data.KeyedValues2D
-
getColumnKey
- Specified by:
getColumnKey
in interfaceorg.jfree.data.KeyedValues2D
-
getColumnIndex
- Specified by:
getColumnIndex
in interfaceorg.jfree.data.KeyedValues2D
-
getColumnKeys
- Specified by:
getColumnKeys
in interfaceorg.jfree.data.KeyedValues2D
-
getValue
- Specified by:
getValue
in interfaceorg.jfree.data.KeyedValues2D
-
getRowCount
public int getRowCount()- Specified by:
getRowCount
in interfaceorg.jfree.data.Values2D
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCount
in interfaceorg.jfree.data.Values2D
-
getValue
- Specified by:
getValue
in interfaceorg.jfree.data.Values2D
-
getStartY
-
getStartY
-
getEndY
-
getEndY
-
getYRange
public org.jfree.data.Range getYRange() -
getColor
Gets thePaint
for the specified data point- Parameters:
row
- index of the series in this collectioncol
- index of the data point in the series- Returns:
Paint
of the specified data point
-
getLabel
Gets the label for the specified data point- Specified by:
getLabel
in interfaceLabeledDataSetCollection
- Parameters:
row
- index of the series in this collectioncol
- index of the data point in the series- Returns:
- label of the specified data point
-
getPointSize
Gets the point size for the specified data point- Parameters:
row
- index of the series in this collectioncol
- index of the data point in the series- Returns:
- point size of the specified data point
-
getPointShape
Gets the point shape for the specified data point- Parameters:
row
- index of the series in this collectioncol
- index of the data point in the series- Returns:
- point shape of the specified data point
-