Package com.illumon.iris.db.tables.utils
Class DBXYCategoryDataset
java.lang.Object
org.jfree.data.general.AbstractDataset
org.jfree.data.general.AbstractSeriesDataset
org.jfree.data.xy.AbstractXYDataset
com.illumon.iris.db.tables.utils.DBXYDataset
com.illumon.iris.db.tables.utils.DBXYCategoryDataset
- All Implemented Interfaces:
DBDataset,ObjectInputValidation,Serializable,Cloneable,EventListener,org.jfree.data.general.Dataset,org.jfree.data.general.SeriesChangeListener,org.jfree.data.general.SeriesDataset,org.jfree.data.xy.XYDataset
public class DBXYCategoryDataset extends DBXYDataset
An implementation of
DBXYDataset that dynamically creates distinct series for different categories.
The categories are defined by the values of a DB table column.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDBXYCategoryDataset.XYPairAndCategoryAnXYPairthat also stores a category.Nested classes/interfaces inherited from class com.illumon.iris.db.tables.utils.DBXYDataset
DBXYDataset.XYPair -
Field Summary
-
Constructor Summary
Constructors Constructor Description DBXYCategoryDataset(ReplicatedTable localTable, String categoricalColumn)DBXYCategoryDataset(String categoricalColumn) -
Method Summary
Modifier and Type Method Description voidfireTableDataChanged()Notifies this DBDataset that the data in the table used as its data source has changed, or that the entire source table itself has changed (such as withDBDataset.setLocalTable(ReplicatedTable).intgetCategoriesCount()intgetItemCount(int series)intgetSeriesCount()Returns the number of series in this dataset.ComparablegetSeriesKey(int series)NumbergetX(int series, int item)NumbergetY(int series, int item)voidsetLocalTable(ReplicatedTable table)Sets theDBXYDataset.localTablethat this dataset will use as its data source.Methods inherited from class org.jfree.data.xy.AbstractXYDataset
getDomainOrder, getXValue, getYValueMethods inherited from class org.jfree.data.general.AbstractDataset
addChangeListener, clone, fireDatasetChanged, getGroup, getNotify, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObjectMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Method Details
-
setLocalTable
Description copied from class:DBXYDatasetSets theDBXYDataset.localTablethat this dataset will use as its data source. Calling code should subsequently invokeDBXYDataset.fireTableDataChanged()on the event dispatch thread.- Specified by:
setLocalTablein interfaceDBDataset- Overrides:
setLocalTablein classDBXYDataset- See Also:
DBDataset.setLocalTable(ReplicatedTable)
-
getSeriesCount
public int getSeriesCount()Returns the number of series in this dataset. This is the number of series defined for the chart times the number of categories- Specified by:
getSeriesCountin interfaceorg.jfree.data.general.SeriesDataset- Overrides:
getSeriesCountin classDBXYDataset- Returns:
-
getSeriesKey
- Specified by:
getSeriesKeyin interfaceorg.jfree.data.general.SeriesDataset- Overrides:
getSeriesKeyin classDBXYDataset
-
getCategoriesCount
public int getCategoriesCount() -
getItemCount
public int getItemCount(int series)- Specified by:
getItemCountin interfaceorg.jfree.data.xy.XYDataset- Overrides:
getItemCountin classDBXYDataset
-
getX
- Specified by:
getXin interfaceorg.jfree.data.xy.XYDataset- Overrides:
getXin classDBXYDataset
-
getY
- Specified by:
getYin interfaceorg.jfree.data.xy.XYDataset- Overrides:
getYin classDBXYDataset
-
fireTableDataChanged
public void fireTableDataChanged()Description copied from interface:DBDatasetNotifies this DBDataset that the data in the table used as its data source has changed, or that the entire source table itself has changed (such as withDBDataset.setLocalTable(ReplicatedTable).If an implementation of
fireTableDataChanged()callsAbstractDataset.fireDatasetChanged(), or otherwise interacts with JFreeChart, then this method should only be called on the event dispatch thread. (SeeSwingUtilities.invokeLater().)- Specified by:
fireTableDataChangedin interfaceDBDataset- Overrides:
fireTableDataChangedin classDBXYDataset
-