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 voidadd(CategoryDataSeriesInternal series)Adds a series to this collection.voidadd(MultiSeriesInternal<CategoryDataSeriesInternal> series)voidaddChangeListener(org.jfree.data.general.DatasetChangeListener datasetChangeListener)AxesImplaxes()voidconstructSnapshot()Constructs a snapshot of this dataset collection.intdimension()Gets the dimension of this data set.Integerget(Comparable seriesName)Returns index of the series, -1 if its not foundList<CategoryDataSeriesInternal>getAllSeries()intgetColumnCount()intgetColumnIndex(Comparable key)ComparablegetColumnKey(int column)ListgetColumnKeys()PieDataSetCollectiongetCurrentSnapshot()Returns a snapshot of this dataset collection in which no series which will update.org.jfree.data.general.DatasetGroupgetGroup()intgetIndex(Comparable key)intgetItemCount()ComparablegetKey(int item)ListgetKeys()PlotInfogetPlotInfo()intgetRowCount()intgetRowIndex(Comparable key)ComparablegetRowKey(int row)ListgetRowKeys()NumbergetValue(int item)NumbergetValue(int row, int column)NumbergetValue(Comparable comparable)NumbergetValue(Comparable rowKey, Comparable columnKey)intid()Gets the id of this datasetcollection which is same as the id of theAxesinstance it is associated withCollection<MultiSeriesInternal<CategoryDataSeriesInternal>>multiSeries()voidnotifyDataChanged()Notifies this listener that the underlying data has changed.voidnotifyDataChanged(RunnableFuture runnable)Notifies this listener that the underlying data has changed.voidnotifySeriesChanged(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.voidremoveChangeListener(org.jfree.data.general.DatasetChangeListener datasetChangeListener)Collection<CategoryDataSeriesInternal>series()voidsetGroup(org.jfree.data.general.DatasetGroup datasetGroup)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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-dataSeriesCollectionmust not be nullUnsupportedOperationException-dataSeriesCollectionmust contain less than 2CategoryDataSeriesInternal.
-
-
Method Details
-
axes
- Specified by:
axesin interfaceDataSetCollection<CategoryDataSeriesInternal>- Returns:
- the axes of this dataset collection
-
series
- Specified by:
seriesin interfaceDataSetCollection<CategoryDataSeriesInternal>- Returns:
- the series (not including the MultiSeries) in this collection
-
multiSeries
- Specified by:
multiSeriesin interfaceDataSetCollection<CategoryDataSeriesInternal>
-
add
Description copied from interface:DataSetCollectionAdds a series to this collection.- Specified by:
addin interfaceDataSetCollection<CategoryDataSeriesInternal>- Parameters:
series- series
-
add
- Specified by:
addin interfaceDataSetCollection<CategoryDataSeriesInternal>
-
remove
Description copied from interface:DataSetCollectionRemoves the series with the specified names from this collection.- Specified by:
removein interfaceDataSetCollection<CategoryDataSeriesInternal>- Parameters:
names- series names
-
dimension
public int dimension()Description copied from interface:DataSetCollectionGets the dimension of this data set.- Specified by:
dimensionin interfaceDataSetCollection<CategoryDataSeriesInternal>- Returns:
- dimension of this data set
-
getAllSeries
- Specified by:
getAllSeriesin interfaceDataSetCollection<CategoryDataSeriesInternal>- Returns:
- all series from this collection
-
constructSnapshot
public void constructSnapshot()Description copied from interface:DataSetCollectionConstructs a snapshot of this dataset collection.- Specified by:
constructSnapshotin interfaceDataSetCollection<CategoryDataSeriesInternal>
-
id
public int id()Description copied from interface:DataSetCollectionGets the id of this datasetcollection which is same as the id of theAxesinstance it is associated with- Specified by:
idin interfaceDataSetCollection<CategoryDataSeriesInternal>- Returns:
- - id of the datasetcollection
-
get
Description copied from interface:DataSetCollectionReturns index of the series, -1 if its not found- Specified by:
getin interfaceDataSetCollection<CategoryDataSeriesInternal>- Parameters:
seriesName- name of the series- Returns:
- index of the series
-
getCurrentSnapshot
Description copied from interface:DataSetCollectionReturns a snapshot of this dataset collection in which no series which will update.- Specified by:
getCurrentSnapshotin interfaceDataSetCollection<CategoryDataSeriesInternal>
-
notifyDataChanged
public void notifyDataChanged()Description copied from interface:DataChangeListenerNotifies this listener that the underlying data has changed.- Specified by:
notifyDataChangedin interfaceDataChangeListener
-
notifyDataChanged
Description copied from interface:DataChangeListenerNotifies this listener that the underlying data has changed.- Specified by:
notifyDataChangedin interfaceDataChangeListener- Parameters:
runnable- to call once done
-
notifySeriesChanged
public void notifySeriesChanged(boolean incremental)Description copied from interface:DataChangeListenerNotifies this listener that the underlying data has a new series.- Specified by:
notifySeriesChangedin interfaceDataChangeListener- Parameters:
incremental- whether the series change is additive
-
getKey
- Specified by:
getKeyin interfaceorg.jfree.data.KeyedValues
-
getIndex
- Specified by:
getIndexin interfaceorg.jfree.data.KeyedValues
-
getKeys
- Specified by:
getKeysin interfaceorg.jfree.data.KeyedValues
-
getValue
- Specified by:
getValuein interfaceorg.jfree.data.KeyedValues
-
getItemCount
public int getItemCount()- Specified by:
getItemCountin interfaceorg.jfree.data.Values
-
getValue
- Specified by:
getValuein interfaceorg.jfree.data.Values
-
addChangeListener
public void addChangeListener(org.jfree.data.general.DatasetChangeListener datasetChangeListener)- Specified by:
addChangeListenerin interfaceorg.jfree.data.general.Dataset
-
removeChangeListener
public void removeChangeListener(org.jfree.data.general.DatasetChangeListener datasetChangeListener)- Specified by:
removeChangeListenerin interfaceorg.jfree.data.general.Dataset
-
getGroup
public org.jfree.data.general.DatasetGroup getGroup()- Specified by:
getGroupin interfaceorg.jfree.data.general.Dataset
-
setGroup
public void setGroup(org.jfree.data.general.DatasetGroup datasetGroup)- Specified by:
setGroupin interfaceorg.jfree.data.general.Dataset
-
getRowKey
- Specified by:
getRowKeyin interfaceorg.jfree.data.KeyedValues2D
-
getRowIndex
- Specified by:
getRowIndexin interfaceorg.jfree.data.KeyedValues2D
-
getRowKeys
- Specified by:
getRowKeysin interfaceorg.jfree.data.KeyedValues2D
-
getColumnKey
- Specified by:
getColumnKeyin interfaceorg.jfree.data.KeyedValues2D
-
getColumnIndex
- Specified by:
getColumnIndexin interfaceorg.jfree.data.KeyedValues2D
-
getColumnKeys
- Specified by:
getColumnKeysin interfaceorg.jfree.data.KeyedValues2D
-
getValue
- Specified by:
getValuein interfaceorg.jfree.data.KeyedValues2D
-
getRowCount
public int getRowCount()- Specified by:
getRowCountin interfaceorg.jfree.data.Values2D
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCountin interfaceorg.jfree.data.Values2D
-
getValue
- Specified by:
getValuein interfaceorg.jfree.data.Values2D
-
getPlotInfo
- Specified by:
getPlotInfoin interfacePlotExceptionCause
-