Package com.illumon.iris.db.tables.utils
Class DBXYDataset
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
- 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
- Direct Known Subclasses:
DBXYCategoryDataset
public class DBXYDataset extends org.jfree.data.xy.AbstractXYDataset implements DBDataset
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DBXYDataset.XYPair
A pair consisting of the column names to be used as the sources for the X and Y axes. -
Field Summary
Fields Modifier and Type Field Description protected ReplicatedTable
localTable
The Table this DBDatset is currently using as its data source. -
Constructor Summary
Constructors Constructor Description DBXYDataset(ReplicatedTable localTable)
Constructs a DBXYDataset that useslocalTable
as its data source. -
Method Summary
Modifier and Type Method Description void
addSeries(String xColumn, String yColumn)
void
fireTableDataChanged()
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)
.int
getItemCount(int i)
int
getSeriesCount()
Comparable
getSeriesKey(int series)
Number
getX(int series, int item)
List<DBXYDataset.XYPair>
getXYPairs()
Returns an unmodifiable view of theXYPairs
in this dataset.Number
getY(int series, int item)
void
setLocalTable(ReplicatedTable table)
Sets thelocalTable
that this dataset will use as its data source.Methods inherited from class org.jfree.data.xy.AbstractXYDataset
getDomainOrder, getXValue, getYValue
Methods inherited from class org.jfree.data.general.AbstractDataset
addChangeListener, clone, fireDatasetChanged, 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
-
Field Details
-
localTable
The Table this DBDatset is currently using as its data source. This can change, such as with OneClick filtering.
-
-
Constructor Details
-
DBXYDataset
Constructs a DBXYDataset that useslocalTable
as its data source.- Parameters:
localTable
- The table to use as the data source. This can be null.
-
-
Method Details
-
setLocalTable
Sets thelocalTable
that this dataset will use as its data source. Calling code should subsequently invokefireTableDataChanged()
on the event dispatch thread.- Specified by:
setLocalTable
in interfaceDBDataset
- Parameters:
table
-- See Also:
DBDataset.setLocalTable(ReplicatedTable)
-
getXYPairs
Returns an unmodifiable view of theXYPairs
in this dataset.- Returns:
-
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
-
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
-
getY
- Specified by:
getY
in interfaceorg.jfree.data.xy.XYDataset
-
addSeries
-
fireTableDataChanged
public void fireTableDataChanged()Description copied from interface:DBDataset
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)
.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:
fireTableDataChanged
in interfaceDBDataset
-