Class PieDataSetCollection
java.lang.Object
com.illumon.iris.db.plot.datasets.pie.PieDataSetCollection
- All Implemented Interfaces:
DataSetCollection<CategoryDataSeriesInternal>
,PlotExceptionCause
,DataChangeListener
,org.jfree.data.category.CategoryDataset
,org.jfree.data.general.Dataset
,org.jfree.data.general.PieDataset
,org.jfree.data.KeyedValues
,org.jfree.data.KeyedValues2D
,org.jfree.data.Values
,org.jfree.data.Values2D
public class PieDataSetCollection extends Object implements DataSetCollection<CategoryDataSeriesInternal>, org.jfree.data.general.PieDataset, org.jfree.data.category.CategoryDataset
Wraps a
CategoryDataSetCollection
to create a
dataset appropriate for pie charts.
The underlying CategoryDataSetCollection
must
contain exactly one CategoryDataSeriesInternal
.-
Constructor Summary
Constructors Constructor Description PieDataSetCollection(CategoryDataSetCollection dataSeriesCollection, boolean notifyDataChanged)
Creates a PieDataSetCollection instance. -
Method Summary
Modifier and Type Method Description void
add(CategoryDataSeriesInternal series)
Adds a series to this collection.void
add(MultiSeriesInternal<CategoryDataSeriesInternal> series)
void
addChangeListener(org.jfree.data.general.DatasetChangeListener datasetChangeListener)
AxesImpl
axes()
void
constructSnapshot()
Constructs a snapshot of this dataset collection.int
dimension()
Gets the dimension of this data set.Integer
get(Comparable seriesName)
Returns index of the series, -1 if its not foundList<CategoryDataSeriesInternal>
getAllSeries()
int
getColumnCount()
int
getColumnIndex(Comparable key)
Comparable
getColumnKey(int column)
List
getColumnKeys()
PieDataSetCollection
getCurrentSnapshot()
Returns a snapshot of this dataset collection in which no series which will update.org.jfree.data.general.DatasetGroup
getGroup()
int
getIndex(Comparable key)
int
getItemCount()
Comparable
getKey(int item)
List
getKeys()
PlotInfo
getPlotInfo()
int
getRowCount()
int
getRowIndex(Comparable key)
Comparable
getRowKey(int row)
List
getRowKeys()
Number
getValue(int item)
Number
getValue(int row, int column)
Number
getValue(Comparable comparable)
Number
getValue(Comparable rowKey, Comparable columnKey)
int
id()
Gets the id of this datasetcollection which is same as the id of theAxes
instance it is associated withCollection<MultiSeriesInternal<CategoryDataSeriesInternal>>
multiSeries()
void
notifyDataChanged()
Notifies this listener that the underlying data has changed.void
notifyDataChanged(RunnableFuture runnable)
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<CategoryDataSeriesInternal>
series()
void
setGroup(org.jfree.data.general.DatasetGroup datasetGroup)
Methods inherited from class java.lang.Object
clone, 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
-
PieDataSetCollection
public PieDataSetCollection(CategoryDataSetCollection dataSeriesCollection, boolean notifyDataChanged)Creates a PieDataSetCollection instance.- Parameters:
dataSeriesCollection
- datanotifyDataChanged
- whether to fire dataset changed events- Throws:
PlotIllegalArgumentException
-dataSeriesCollection
must not be nullUnsupportedOperationException
-dataSeriesCollection
must contain less than 2CategoryDataSeriesInternal
.
-
-
Method Details
-
axes
- Specified by:
axes
in interfaceDataSetCollection<CategoryDataSeriesInternal>
- Returns:
- the axes of this dataset collection
-
series
- Specified by:
series
in interfaceDataSetCollection<CategoryDataSeriesInternal>
- Returns:
- the series (not including the MultiSeries) in this collection
-
multiSeries
- Specified by:
multiSeries
in interfaceDataSetCollection<CategoryDataSeriesInternal>
-
add
Description copied from interface:DataSetCollection
Adds a series to this collection.- Specified by:
add
in interfaceDataSetCollection<CategoryDataSeriesInternal>
- Parameters:
series
- series
-
add
- Specified by:
add
in interfaceDataSetCollection<CategoryDataSeriesInternal>
-
remove
Description copied from interface:DataSetCollection
Removes the series with the specified names from this collection.- Specified by:
remove
in interfaceDataSetCollection<CategoryDataSeriesInternal>
- 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<CategoryDataSeriesInternal>
- Returns:
- dimension of this data set
-
getAllSeries
- Specified by:
getAllSeries
in interfaceDataSetCollection<CategoryDataSeriesInternal>
- 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<CategoryDataSeriesInternal>
-
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<CategoryDataSeriesInternal>
- Returns:
- - id of the datasetcollection
-
get
Description copied from interface:DataSetCollection
Returns index of the series, -1 if its not found- Specified by:
get
in interfaceDataSetCollection<CategoryDataSeriesInternal>
- Parameters:
seriesName
- name of the series- Returns:
- index of the series
-
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>
-
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:
runnable
- 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
-
getKey
- Specified by:
getKey
in interfaceorg.jfree.data.KeyedValues
-
getIndex
- Specified by:
getIndex
in interfaceorg.jfree.data.KeyedValues
-
getKeys
- Specified by:
getKeys
in interfaceorg.jfree.data.KeyedValues
-
getValue
- Specified by:
getValue
in interfaceorg.jfree.data.KeyedValues
-
getItemCount
public int getItemCount()- Specified by:
getItemCount
in interfaceorg.jfree.data.Values
-
getValue
- Specified by:
getValue
in interfaceorg.jfree.data.Values
-
addChangeListener
public void addChangeListener(org.jfree.data.general.DatasetChangeListener datasetChangeListener)- Specified by:
addChangeListener
in interfaceorg.jfree.data.general.Dataset
-
removeChangeListener
public void removeChangeListener(org.jfree.data.general.DatasetChangeListener datasetChangeListener)- Specified by:
removeChangeListener
in interfaceorg.jfree.data.general.Dataset
-
getGroup
public org.jfree.data.general.DatasetGroup getGroup()- Specified by:
getGroup
in interfaceorg.jfree.data.general.Dataset
-
setGroup
public void setGroup(org.jfree.data.general.DatasetGroup datasetGroup)- Specified by:
setGroup
in interfaceorg.jfree.data.general.Dataset
-
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
-
getPlotInfo
- Specified by:
getPlotInfo
in interfacePlotExceptionCause
-