Class IntervalDataSetCollectionWrapper<T extends XYDataSeriesInternal>
java.lang.Object
org.jfree.data.general.AbstractDataset
org.jfree.data.general.AbstractSeriesDataset
com.illumon.iris.db.plot.datasets.interval.IntervalDataSetCollectionWrapper<T>
- All Implemented Interfaces:
DataSetCollection<T>
,LabeledDataSetCollection
,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.IntervalXYDataset
,org.jfree.data.xy.XYDataset
- Direct Known Subclasses:
IntervalAndTableXYDataSetCollectionWrapper
,IntervalDataSetCollectionWrapper.IntervalDataSetCollectionWrapperSnapshot
public class IntervalDataSetCollectionWrapper<T extends XYDataSeriesInternal> extends org.jfree.data.general.AbstractSeriesDataset implements org.jfree.data.xy.XYDataset, DataSetCollection<T>, LabeledDataSetCollection, org.jfree.data.xy.IntervalXYDataset, Serializable
Collection of
IntervalXYDataSeriesInternal
.
Data values are placed in the middle of the bar. Bar width
is based off the smallest difference between adjacent data points.- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IntervalDataSetCollectionWrapper.IntervalDataSetCollectionWrapperSnapshot<T extends XYDataSeriesInternal>
-
Constructor Summary
Constructors Constructor Description IntervalDataSetCollectionWrapper(LambdaGovernor governor, XYDataSetCollection<T> data, boolean notifyDataChanged)
Creates an instance of IntervalDataSetCollectionWrapper. -
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)
AxesImpl
axes()
org.jfree.data.Range
calculateXRangeWithBars()
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()
IntervalDataSetCollectionWrapper
getCurrentSnapshot()
Returns a snapshot of this dataset collection in which no series which will update.org.jfree.data.DomainOrder
getDomainOrder()
Number
getEndX(int i, int i1)
double
getEndXValue(int i, int i1)
Number
getEndY(int i, int i1)
double
getEndYValue(int i, int i1)
protected LambdaGovernor
getGovernor()
int
getItemCount(int i)
String
getLabel(int series, int item)
Gets the label for a data point.PlotInfo
getPlotInfo()
int
getSeriesCount()
Comparable
getSeriesKey(int i)
Number
getStartX(int i, int i1)
double
getStartXValue(int i, int i1)
Number
getStartY(int i, int i1)
double
getStartYValue(int i, int i1)
Number
getX(int i, int i1)
double
getXValue(int i, int i1)
Number
getY(int i, int i1)
double
getYValue(int i, int i1)
int
id()
Gets the id of this datasetcollection which is same as the id of theAxes
instance it is associated withCollection<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 seriesChanged)
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.Collection<T>
series()
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
-
Constructor Details
-
IntervalDataSetCollectionWrapper
public IntervalDataSetCollectionWrapper(LambdaGovernor governor, XYDataSetCollection<T> data, boolean notifyDataChanged)Creates an instance of IntervalDataSetCollectionWrapper. Calculates a dataset suitable for bar charts from anXYDataSetCollection
.- Parameters:
governor
- update throttledata
- datanotifyDataChanged
- whether to fire dataset changed events
-
-
Method Details
-
getGovernor
-
axes
- Specified by:
axes
in interfaceDataSetCollection<T extends XYDataSeriesInternal>
- Returns:
- the axes of this dataset collection
-
getLabel
Description copied from interface:LabeledDataSetCollection
Gets the label for a data point.- Specified by:
getLabel
in interfaceLabeledDataSetCollection
- Parameters:
series
- series indexitem
- data point index inside specified series- Returns:
- label for specified data point
-
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
-
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 seriesChanged)Description copied from interface:DataChangeListener
Notifies this listener that the underlying data has a new series.- Specified by:
notifySeriesChanged
in interfaceDataChangeListener
- Parameters:
seriesChanged
- whether the series change is additive
-
getSeriesCount
public int getSeriesCount()- Specified by:
getSeriesCount
in interfaceorg.jfree.data.general.SeriesDataset
- Specified by:
getSeriesCount
in classorg.jfree.data.general.AbstractSeriesDataset
-
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
-
getStartX
- Specified by:
getStartX
in interfaceorg.jfree.data.xy.IntervalXYDataset
-
getStartXValue
public double getStartXValue(int i, int i1)- Specified by:
getStartXValue
in interfaceorg.jfree.data.xy.IntervalXYDataset
-
getEndX
- Specified by:
getEndX
in interfaceorg.jfree.data.xy.IntervalXYDataset
-
getEndXValue
public double getEndXValue(int i, int i1)- Specified by:
getEndXValue
in interfaceorg.jfree.data.xy.IntervalXYDataset
-
getStartY
- Specified by:
getStartY
in interfaceorg.jfree.data.xy.IntervalXYDataset
-
getStartYValue
public double getStartYValue(int i, int i1)- Specified by:
getStartYValue
in interfaceorg.jfree.data.xy.IntervalXYDataset
-
getEndY
- Specified by:
getEndY
in interfaceorg.jfree.data.xy.IntervalXYDataset
-
getEndYValue
public double getEndYValue(int i, int i1)- Specified by:
getEndYValue
in interfaceorg.jfree.data.xy.IntervalXYDataset
-
getDomainOrder
public org.jfree.data.DomainOrder getDomainOrder()- Specified by:
getDomainOrder
in interfaceorg.jfree.data.xy.XYDataset
-
getItemCount
public int getItemCount(int i)- Specified by:
getItemCount
in interfaceorg.jfree.data.xy.XYDataset
-
getX
- Specified by:
getX
in interfaceorg.jfree.data.xy.XYDataset
-
getXValue
public double getXValue(int i, int i1)- Specified by:
getXValue
in interfaceorg.jfree.data.xy.XYDataset
-
getY
- Specified by:
getY
in interfaceorg.jfree.data.xy.XYDataset
-
getYValue
public double getYValue(int i, int i1)- Specified by:
getYValue
in interfaceorg.jfree.data.xy.XYDataset
-
addFireDatasetChangeListener
public void addFireDatasetChangeListener(AbstractDataSetCollection.FireDatasetChangeListener listener) -
fireDatasetChanged
protected void fireDatasetChanged()- Overrides:
fireDatasetChanged
in classorg.jfree.data.general.AbstractDataset
-
calculateXRangeWithBars
public org.jfree.data.Range calculateXRangeWithBars() -
getPlotInfo
- Specified by:
getPlotInfo
in interfacePlotExceptionCause
-