Class StackedXYDataSetCollection<T extends XYDataSeriesInternal>
java.lang.Object
org.jfree.data.general.AbstractDataset
org.jfree.data.general.AbstractSeriesDataset
com.illumon.iris.db.plot.datasets.xy.StackedXYDataSetCollection<T>
- All Implemented Interfaces:
DataSetCollection<T>
,PlotExceptionCause
,DataChangeListener
,ObjectInputValidation
,Serializable
,Cloneable
,EventListener
,org.jfree.data.general.Dataset
,org.jfree.data.general.SeriesChangeListener
,org.jfree.data.general.SeriesDataset
,org.jfree.data.xy.TableXYDataset
,org.jfree.data.xy.XYDataset
- Direct Known Subclasses:
StackedXYDataSetCollection.StackedXYDataSetCollectionSnapshot
public class StackedXYDataSetCollection<T extends XYDataSeriesInternal> extends org.jfree.data.general.AbstractSeriesDataset implements DataSetCollection<T>, org.jfree.data.xy.TableXYDataset, Serializable
DataSetCollection
for stacked area charts.
All XYDataSeriesInternal
in the collection must have the same x-values.- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StackedXYDataSetCollection.StackedXYDataSetCollectionSnapshot<T extends XYDataSeriesInternal>
-
Constructor Summary
Constructors Constructor Description StackedXYDataSetCollection(LambdaGovernor governor, XYDataSetCollection<T> dataset, boolean notifyDataChanged)
Creates a StackedXYDataSetCollection instance. -
Method Summary
Modifier and Type Method Description void
add(MultiSeriesInternal<T> series)
void
add(T series)
Adds a series to this collection.void
addChangeListener(org.jfree.data.general.DatasetChangeListener datasetChangeListener)
void
addFireDatasetChangeListener(AbstractDataSetCollection.FireDatasetChangeListener lisetener)
AxesImpl
axes()
void
constructSnapshot()
Constructs a snapshot of this dataset collection.int
dimension()
Gets the dimension of this data set.protected void
fireDatasetChanged()
Integer
get(Comparable seriesName)
Returns index of the series, -1 if its not foundList<T>
getAllSeries()
StackedXYDataSetCollection
getCurrentSnapshot()
Returns a snapshot of this dataset collection in which no series which will update.org.jfree.data.DomainOrder
getDomainOrder()
org.jfree.data.general.DatasetGroup
getGroup()
int
getItemCount()
int
getItemCount(int series)
PlotInfo
getPlotInfo()
int
getSeriesCount()
Comparable
getSeriesKey(int series)
Number
getX(int series, int item)
double
getXValue(int series, int item)
Number
getY(int series, int item)
double
getYValue(int series, int item)
int
id()
Gets the id of this datasetcollection which is same as the id of theAxes
instance it is associated withint
indexOf(Comparable series)
Collection<MultiSeriesInternal<T>>
multiSeries()
void
notifyDataChanged()
Notifies this listener that the underlying data has changed.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.Set<? extends SeriesInternal>
remove(String... names)
Removes the series with the specified names from this collection.void
removeChangeListener(org.jfree.data.general.DatasetChangeListener datasetChangeListener)
Collection<T>
series()
void
setGroup(org.jfree.data.general.DatasetGroup datasetGroup)
Methods inherited from class org.jfree.data.general.AbstractDataset
clone, getNotify, hasListener, notifyListeners, 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, onOneClick, onOneClickRemoved, removeOnOneClick
-
Constructor Details
-
StackedXYDataSetCollection
public StackedXYDataSetCollection(LambdaGovernor governor, XYDataSetCollection<T> dataset, boolean notifyDataChanged)Creates a StackedXYDataSetCollection instance.- Parameters:
dataset
- datanotifyDataChanged
- whether to fire dataset changed events- Throws:
PlotIllegalArgumentException
-collection
must not be nullIllegalArgumentException
- all series must have the same x-values
-
-
Method Details
-
axes
- Specified by:
axes
in interfaceDataSetCollection<T extends XYDataSeriesInternal>
- Returns:
- the axes of this dataset collection
-
series
- Specified by:
series
in interfaceDataSetCollection<T extends XYDataSeriesInternal>
- Returns:
- the series (not including the MultiSeries) in this collection
-
multiSeries
- Specified by:
multiSeries
in interfaceDataSetCollection<T extends XYDataSeriesInternal>
-
add
Description copied from interface:DataSetCollection
Adds a series to this collection.- Specified by:
add
in interfaceDataSetCollection<T extends XYDataSeriesInternal>
- Parameters:
series
- series
-
add
- Specified by:
add
in interfaceDataSetCollection<T extends XYDataSeriesInternal>
-
remove
Description copied from interface:DataSetCollection
Removes the series with the specified names from this collection.- Specified by:
remove
in interfaceDataSetCollection<T extends XYDataSeriesInternal>
- Parameters:
names
- series names
-
dimension
public int dimension()Description copied from interface:DataSetCollection
Gets the dimension of this data set.- Specified by:
dimension
in interfaceDataSetCollection<T extends XYDataSeriesInternal>
- Returns:
- dimension of this data set
-
getSeriesCount
public int getSeriesCount()- Specified by:
getSeriesCount
in interfaceorg.jfree.data.general.SeriesDataset
- Specified by:
getSeriesCount
in classorg.jfree.data.general.AbstractSeriesDataset
-
getAllSeries
- Specified by:
getAllSeries
in interfaceDataSetCollection<T extends XYDataSeriesInternal>
- Returns:
- all series from this collection
-
constructSnapshot
public void constructSnapshot()Description copied from interface:DataSetCollection
Constructs a snapshot of this dataset collection.- Specified by:
constructSnapshot
in interfaceDataSetCollection<T extends XYDataSeriesInternal>
-
id
public int id()Description copied from interface:DataSetCollection
Gets the id of this datasetcollection which is same as the id of theAxes
instance it is associated with- Specified by:
id
in interfaceDataSetCollection<T extends XYDataSeriesInternal>
- Returns:
- - id of the datasetcollection
-
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<T extends XYDataSeriesInternal>
-
notifyDataChanged
public void notifyDataChanged()Description copied from interface:DataChangeListener
Notifies this listener that the underlying data has changed.- Specified by:
notifyDataChanged
in interfaceDataChangeListener
-
notifyDataChanged
Description copied from interface:DataChangeListener
Notifies this listener that the underlying data has changed.- Specified by:
notifyDataChanged
in interfaceDataChangeListener
- 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
- Parameters:
incremental
- whether the series change is additive
-
addFireDatasetChangeListener
public void addFireDatasetChangeListener(AbstractDataSetCollection.FireDatasetChangeListener lisetener) -
fireDatasetChanged
protected void fireDatasetChanged()- Overrides:
fireDatasetChanged
in classorg.jfree.data.general.AbstractDataset
-
getItemCount
public int getItemCount()- Specified by:
getItemCount
in interfaceorg.jfree.data.xy.TableXYDataset
-
getDomainOrder
public org.jfree.data.DomainOrder getDomainOrder()- Specified by:
getDomainOrder
in interfaceorg.jfree.data.xy.XYDataset
-
getItemCount
public int getItemCount(int series)- Specified by:
getItemCount
in interfaceorg.jfree.data.xy.XYDataset
-
getX
- Specified by:
getX
in interfaceorg.jfree.data.xy.XYDataset
-
getXValue
public double getXValue(int series, int item)- Specified by:
getXValue
in interfaceorg.jfree.data.xy.XYDataset
-
getY
- Specified by:
getY
in interfaceorg.jfree.data.xy.XYDataset
-
getYValue
public double getYValue(int series, int item)- Specified by:
getYValue
in interfaceorg.jfree.data.xy.XYDataset
-
getSeriesKey
- Specified by:
getSeriesKey
in interfaceorg.jfree.data.general.SeriesDataset
- Specified by:
getSeriesKey
in classorg.jfree.data.general.AbstractSeriesDataset
-
get
Description copied from interface:DataSetCollection
Returns index of the series, -1 if its not found- Specified by:
get
in interfaceDataSetCollection<T extends XYDataSeriesInternal>
- Parameters:
seriesName
- name of the series- Returns:
- index of the series
-
indexOf
- Specified by:
indexOf
in interfaceorg.jfree.data.general.SeriesDataset
- Overrides:
indexOf
in classorg.jfree.data.general.AbstractSeriesDataset
-
addChangeListener
public void addChangeListener(org.jfree.data.general.DatasetChangeListener datasetChangeListener)- Specified by:
addChangeListener
in interfaceorg.jfree.data.general.Dataset
- Overrides:
addChangeListener
in classorg.jfree.data.general.AbstractDataset
-
removeChangeListener
public void removeChangeListener(org.jfree.data.general.DatasetChangeListener datasetChangeListener)- Specified by:
removeChangeListener
in interfaceorg.jfree.data.general.Dataset
- Overrides:
removeChangeListener
in classorg.jfree.data.general.AbstractDataset
-
getGroup
public org.jfree.data.general.DatasetGroup getGroup()- Specified by:
getGroup
in interfaceorg.jfree.data.general.Dataset
- Overrides:
getGroup
in classorg.jfree.data.general.AbstractDataset
-
setGroup
public void setGroup(org.jfree.data.general.DatasetGroup datasetGroup)- Specified by:
setGroup
in interfaceorg.jfree.data.general.Dataset
- Overrides:
setGroup
in classorg.jfree.data.general.AbstractDataset
-
getPlotInfo
- Specified by:
getPlotInfo
in interfacePlotExceptionCause
-