Class CategoryDataSeriesSwappableTableMap
java.lang.Object
com.illumon.iris.db.plot.AbstractSeriesInternal
com.illumon.iris.db.plot.datasets.AbstractDataSeries
com.illumon.iris.db.plot.datasets.category.AbstractCategoryDataSeries
com.illumon.iris.db.plot.datasets.category.AbstractSwappableTableBasedCategoryDataSeries
com.illumon.iris.db.plot.datasets.category.CategoryDataSeriesSwappableTableMap
- All Implemented Interfaces:
CategoryDataSeries
,CategoryDataSeriesInternal
,CategorySwappableTableDataSeriesInternal
,CategoryTableDataSeriesInternal
,DataSeries
,DataSeriesInternal
,PlotExceptionCause
,Series
,SeriesInternal
,TableSnapshotSeries
,SwappableTable.LocalTableUpdateListener
,TableSnapshotChangeListener
,Serializable
public class CategoryDataSeriesSwappableTableMap extends AbstractSwappableTableBasedCategoryDataSeries implements SwappableTable.LocalTableUpdateListener, CategorySwappableTableDataSeriesInternal, TableSnapshotSeries
A dataset for
SwappableTable
based categorical data.- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description CategoryDataSeriesSwappableTableMap(AxesImpl axes, int id, Comparable<?> name, SwappableTable<?,?> swappableTable, String categories, String values)
Creates a CategoryDataSeriesSwappableTableMap instance. -
Method Summary
Modifier and Type Method Description Collection<Comparable>
categories()
Gets the categories of the dataset.CategoryDataSeriesSwappableTableMap
copy(AxesImpl axes)
Create a copy of the series on a different set of axes.AbstractCategoryDataSeries
createSnapshot()
Returns a snapshot of this dataset which will not update.String
getCategoryCol()
long
getCategoryLocation(Comparable category)
Get the row key of the specified series.String
getNumericCol()
SwappableTable
getSwappableTable()
Number
getValue(Comparable category)
Gets the numeric value corresponding to the givencategory
.org.jfree.data.Range
getYRange()
Gets the y range of this dataset.void
init()
Do any required initialization before data may be read from the series.void
onClose()
Series shut down after the plot is closed.void
onInflate()
Series set up after this series is serialized.void
onLocalTableUpdate(Table localTable)
Updates this listener with the new table.int
size()
Gets the size of this data set.Methods inherited from class com.illumon.iris.db.plot.datasets.category.AbstractSwappableTableBasedCategoryDataSeries
constructTableMapFromFunction, pointColor, pointColorByY, pointColorInteger, pointLabel, pointShape, pointSize
Methods inherited from class com.illumon.iris.db.plot.datasets.category.AbstractCategoryDataSeries
colorsSetSpecific, errorBarColor, errorBarColor, errorBarColor, getColor, getGroup, getLabel, getPiePercentLabelFormat, getPointShape, getPointSize, getSeriesColor, gradientVisible, group, labelsSetSpecific, lineColor, lineColor, lineColor, lineStyle, linesVisible, piePercentLabelFormat, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColorByY, pointColorByY, pointColorInteger, pointLabel, pointLabel, pointLabel, pointLabel, pointLabel, pointLabelFormat, pointShape, pointShape, pointShape, pointShape, pointShape, pointShape, pointShape, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointsVisible, seriesColor, seriesColor, seriesColor, setPiePercentLabelFormat, shapesSetSpecific, sizesSetSpecific, snapshotModifiers, toolTipPattern, xToolTipPattern, yToolTipPattern
Methods inherited from class com.illumon.iris.db.plot.datasets.AbstractDataSeries
chart, getErrorBarColor, getGradientVisible, getLineColor, getLineStyle, getLinesVisible, getPointLabelFormat, getPointsVisible, getXToolTipPattern, getYToolTipPattern, setErrorBarColor, setErrorBarColor, setErrorBarColor, setGradientVisible, setLineColor, setLineColor, setLineColor, setLineStyle, setLinesVisible, setPointLabelFormat, setPointsVisible, setXToolTipPattern, setYToolTipPattern
Methods inherited from class com.illumon.iris.db.plot.AbstractSeriesInternal
addSwappableTable, addTableHandle, addTableMapHandle, axes, dataChangeListener, getSwappableTables, getTableHandles, getTableMapHandles, id, name, removeTableHandle
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.datasets.category.CategoryDataSeries
errorBarColor, errorBarColor, errorBarColor, gradientVisible, group, lineColor, lineColor, lineColor, lineStyle, linesVisible, piePercentLabelFormat, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColorByY, pointColorInteger, pointColorInteger, pointColorInteger, pointLabel, pointLabel, pointLabel, pointLabel, pointLabel, pointLabel, pointShape, pointShape, pointShape, pointShape, pointShape, pointShape, pointShape, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointsVisible
Methods inherited from interface com.illumon.iris.db.plot.datasets.category.CategoryDataSeriesInternal
drawYError, getColor, getEndY, getGroup, getLabel, getPiePercentLabelFormat, getPointShape, getPointSize, getStartY
Methods inherited from interface com.illumon.iris.db.plot.datasets.DataSeries
pointColorByY, pointColorByY, pointLabel, pointLabelFormat, pointShape, pointShape, pointSize, pointSize, pointSize, pointSize, seriesColor, seriesColor, seriesColor, toolTipPattern, xToolTipPattern, yToolTipPattern
Methods inherited from interface com.illumon.iris.db.plot.datasets.DataSeriesInternal
axes, chart, getErrorBarColor, getGradientVisible, getLineColor, getLineStyle, getLinesVisible, getPlotInfo, getPointLabelFormat, getPointsVisible, getSeriesColor, getXToolTipPattern, getYToolTipPattern, id, name
Methods inherited from interface com.illumon.iris.db.plot.SeriesInternal
addSwappableTable, addTableHandle, addTableMapHandle, dataChangeListener, getSwappableTables, getTableHandles, getTableMapHandles, removeTableHandle
Methods inherited from interface com.illumon.iris.db.plot.util.tables.SwappableTable.LocalTableUpdateListener
onInitialSnapshot
Methods inherited from interface com.illumon.iris.db.plot.TableSnapshotSeries
notifyTableSnapshotChanged
-
Constructor Details
-
CategoryDataSeriesSwappableTableMap
public CategoryDataSeriesSwappableTableMap(AxesImpl axes, int id, Comparable<?> name, SwappableTable<?,?> swappableTable, String categories, String values)Creates a CategoryDataSeriesSwappableTableMap instance.- Type Parameters:
T
- type of the categorical data- Parameters:
axes
- axes on which this data series will be plottedid
- data series idname
- series nameswappableTable
- table data. Table may be swapped outcategories
- discrete data column inswappableTable
values
- continuous data column inswappableTable
- Throws:
PlotIllegalArgumentException
-chart
,swappableTable
,categories
, andvalues
may not be null.RuntimeException
-categories
column must beComparable
values
column must be numeric
-
-
Method Details
-
copy
Description copied from interface:SeriesInternal
Create a copy of the series on a different set of axes.- Specified by:
copy
in interfaceCategoryDataSeriesInternal
- Specified by:
copy
in interfaceDataSeriesInternal
- Specified by:
copy
in interfaceSeriesInternal
- Parameters:
axes
- new axes.- Returns:
- copy of the series on a different set of axes.
-
init
public void init()Description copied from interface:CategoryDataSeriesInternal
Do any required initialization before data may be read from the series.- Specified by:
init
in interfaceCategoryDataSeriesInternal
-
onLocalTableUpdate
Description copied from interface:SwappableTable.LocalTableUpdateListener
Updates this listener with the new table.- Specified by:
onLocalTableUpdate
in interfaceSwappableTable.LocalTableUpdateListener
- Parameters:
localTable
- table
-
onClose
public void onClose()Description copied from interface:SeriesInternal
Series shut down after the plot is closed.- Specified by:
onClose
in interfaceSeriesInternal
- Overrides:
onClose
in classAbstractCategoryDataSeries
-
onInflate
public void onInflate()Description copied from interface:SeriesInternal
Series set up after this series is serialized.- Specified by:
onInflate
in interfaceCategorySwappableTableDataSeriesInternal
- Specified by:
onInflate
in interfaceCategoryTableDataSeriesInternal
- Specified by:
onInflate
in interfaceSeriesInternal
-
size
public int size()Description copied from interface:DataSeriesInternal
Gets the size of this data set.- Specified by:
size
in interfaceDataSeriesInternal
- Returns:
- size of this data set
-
categories
Description copied from interface:CategoryDataSeriesInternal
Gets the categories of the dataset.- Specified by:
categories
in interfaceCategoryDataSeriesInternal
- Returns:
- all categories in the dataset
-
getValue
Description copied from interface:CategoryDataSeriesInternal
Gets the numeric value corresponding to the givencategory
.- Specified by:
getValue
in interfaceCategoryDataSeriesInternal
- Parameters:
category
- category- Returns:
- numeric value corresponding to the given
category
-
getCategoryLocation
Description copied from interface:CategoryDataSeriesInternal
Get the row key of the specified series.- Specified by:
getCategoryLocation
in interfaceCategoryDataSeriesInternal
- Returns:
-
getYRange
public org.jfree.data.Range getYRange()Description copied from interface:CategoryDataSeriesInternal
Gets the y range of this dataset.- Specified by:
getYRange
in interfaceCategoryDataSeriesInternal
- Returns:
- y range of this dataset
-
getCategoryCol
- Specified by:
getCategoryCol
in classAbstractSwappableTableBasedCategoryDataSeries
-
getNumericCol
- Specified by:
getNumericCol
in classAbstractSwappableTableBasedCategoryDataSeries
-
getSwappableTable
- Specified by:
getSwappableTable
in classAbstractSwappableTableBasedCategoryDataSeries
-
createSnapshot
Description copied from interface:DataSeriesInternal
Returns a snapshot of this dataset which will not update.- Specified by:
createSnapshot
in interfaceCategoryDataSeriesInternal
- Specified by:
createSnapshot
in interfaceDataSeriesInternal
-