Class AbstractDataSetCollection<T extends DataSeriesInternal>
java.lang.Object
org.jfree.data.general.AbstractDataset
com.illumon.iris.db.plot.datasets.AbstractDataSetCollection<T>
- All Implemented Interfaces:
DataSetCollection<T>
,PlotExceptionCause
,DataChangeListener
,ObjectInputValidation
,Serializable
,Cloneable
,org.jfree.data.general.Dataset
- Direct Known Subclasses:
AbstractXYDataSetCollection
,CategoryDataSetCollection
public abstract class AbstractDataSetCollection<T extends DataSeriesInternal> extends org.jfree.data.general.AbstractDataset implements DataSetCollection<T>
The basis for a collection of datasets.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AbstractDataSetCollection.FireDatasetChangeListener
-
Constructor Summary
Constructors Constructor Description AbstractDataSetCollection(AxesImpl axes, LambdaGovernor governor, DynamicSeriesNamer dynamicSeriesNamer, PlotInfo plotInfo, boolean notifyDataChanged)
Creates an XYDataSetCollection instance. -
Method Summary
Modifier and Type Method Description void
add(MultiSeriesInternal<T> series)
void
add(T series)
Adds a series to this collection.void
addFireDatasetChangeListener(AbstractDataSetCollection.FireDatasetChangeListener listener)
protected void
addMultiSeries(MultiSeriesInternal<T> series, boolean addToSeriesNamer)
protected void
addSeries(T series, boolean addToSeriesNamer)
AxesImpl
axes()
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()
DynamicSeriesNamer
getDynamicSeriesNamer()
LambdaGovernor
getGovernor()
PlotInfo
getPlotInfo()
protected List<Comparable>
getSeriesNames()
Returns series namesint
id()
Gets the id of this datasetcollection which is same as the id of theAxes
instance it is associated withprotected boolean
isNotifyDataChanged()
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.protected void
reindexSeriesSync(boolean incremental, boolean onlyIfGuiClient, boolean notify)
Set<? extends SeriesInternal>
remove(String... names)
Removes the series with the specified names from this collection.void
removeFireDatasetChangeListener(AbstractDataSetCollection.FireDatasetChangeListener listener)
Collection<T>
series()
void
setSnapshotsEnabled(boolean enabled)
protected void
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, onOneClick, onOneClickRemoved, removeOnOneClick
Methods inherited from interface com.illumon.iris.db.plot.datasets.DataSetCollection
constructSnapshot, getCurrentSnapshot
-
Constructor Details
-
AbstractDataSetCollection
public AbstractDataSetCollection(AxesImpl axes, LambdaGovernor governor, DynamicSeriesNamer dynamicSeriesNamer, PlotInfo plotInfo, boolean notifyDataChanged)Creates an XYDataSetCollection instance.- Parameters:
governor
- update throttle
-
-
Method Details
-
testIfSwingDispatchThreadIfNotTestMode
protected void testIfSwingDispatchThreadIfNotTestMode() -
axes
- Specified by:
axes
in interfaceDataSetCollection<T extends DataSeriesInternal>
- Returns:
- the axes of this dataset collection
-
getPlotInfo
- Specified by:
getPlotInfo
in interfacePlotExceptionCause
-
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 DataSeriesInternal>
- Returns:
- - id of the datasetcollection
-
add
Description copied from interface:DataSetCollection
Adds a series to this collection.- Specified by:
add
in interfaceDataSetCollection<T extends DataSeriesInternal>
- Parameters:
series
- series
-
add
- Specified by:
add
in interfaceDataSetCollection<T extends DataSeriesInternal>
-
addSeries
-
addMultiSeries
-
getDynamicSeriesNamer
-
getGovernor
-
remove
Description copied from interface:DataSetCollection
Removes the series with the specified names from this collection.- Specified by:
remove
in interfaceDataSetCollection<T extends DataSeriesInternal>
- Parameters:
names
- series names
-
series
- Specified by:
series
in interfaceDataSetCollection<T extends DataSeriesInternal>
- Returns:
- the series (not including the MultiSeries) in this collection
-
multiSeries
- Specified by:
multiSeries
in interfaceDataSetCollection<T extends DataSeriesInternal>
-
reindexSeriesSync
protected void reindexSeriesSync(boolean incremental, boolean onlyIfGuiClient, boolean notify) -
getAllSeries
- Specified by:
getAllSeries
in interfaceDataSetCollection<T extends DataSeriesInternal>
- Returns:
- all series from this collection
-
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
-
fireDatasetChanged
protected void fireDatasetChanged()- Overrides:
fireDatasetChanged
in classorg.jfree.data.general.AbstractDataset
-
addFireDatasetChangeListener
public void addFireDatasetChangeListener(AbstractDataSetCollection.FireDatasetChangeListener listener) -
removeFireDatasetChangeListener
public void removeFireDatasetChangeListener(AbstractDataSetCollection.FireDatasetChangeListener listener) -
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
-
dimension
public int dimension()Description copied from interface:DataSetCollection
Gets the dimension of this data set.- Specified by:
dimension
in interfaceDataSetCollection<T extends DataSeriesInternal>
- Returns:
- dimension of this data set
-
get
Description copied from interface:DataSetCollection
Returns index of the series, -1 if its not found- Specified by:
get
in interfaceDataSetCollection<T extends DataSeriesInternal>
- Parameters:
seriesName
- name of the series- Returns:
- index of the series
-
getSeriesNames
Returns series names- Returns:
- series names
-
setSnapshotsEnabled
public void setSnapshotsEnabled(boolean enabled) -
isNotifyDataChanged
protected boolean isNotifyDataChanged()
-