Class OneClickChartModifier<T>
java.lang.Object
com.illumon.iris.db.plot.chartmodifiers.OneClickChartModifier<T>
- All Implemented Interfaces:
SwappableTable.LocalTableUpdateListener
,Serializable
- Direct Known Subclasses:
OneClickChartModifierSwing
public abstract class OneClickChartModifier<T>
extends Object
implements SwappableTable.LocalTableUpdateListener, Serializable
Framework for a class which modifies a chart on a OneClick event
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
At what level in the Figure hierarchy the series of a plot will be restricted, e.g.static interface
Hides series from being drawn until a OneClick event is fired. -
Constructor Summary
ConstructorsConstructorDescriptionOneClickChartModifier
(SwappableTable t, String valueColumn, OneClickChartModifier.VisibilityLevel visibilityLevel, PlotInfo plotInfo) Creates a OneClickChartModifier instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract T
The value in the table is read as an object and must be converted to the parameterized type Tprotected abstract void
modifyChart
(T columnValue) Modifies the chart with thecolumnValue
void
onClose()
Cleans up table references and listeners.void
onLocalTableUpdate
(Table localTable) Updates this listener with the new table.protected abstract void
Called inonLocalTableUpdate(com.illumon.iris.db.tables.Table)
when the table parameter is null.protected void
redraw()
Redraw the chart.void
setGovernor
(LambdaGovernor governor) void
setVisibilityRestricter
(OneClickChartModifier.VisibilityRestricter visibilityRestricter) 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.SwappableTable.LocalTableUpdateListener
onInitialSnapshot
-
Constructor Details
-
OneClickChartModifier
public OneClickChartModifier(SwappableTable t, String valueColumn, OneClickChartModifier.VisibilityLevel visibilityLevel, PlotInfo plotInfo) Creates a OneClickChartModifier instance. Adds itself as aSwappableTable.LocalTableUpdateListener
to the given swappable tablet
.- Parameters:
t
- swappable tablevalueColumn
- column of swappable tablevisibilityLevel
- which series to hide before a OneClick event, e.g. AXIS will hide all series for the given axisplotInfo
- info for exceptions
-
-
Method Details
-
getVisibilityLevel
- Returns:
- the visibility level
-
setVisibilityRestricter
public void setVisibilityRestricter(OneClickChartModifier.VisibilityRestricter visibilityRestricter) - Parameters:
visibilityRestricter
- limits which series are displayed prior to chart drawing
-
setGovernor
-
onLocalTableUpdate
Description copied from interface:SwappableTable.LocalTableUpdateListener
Updates this listener with the new table.- Specified by:
onLocalTableUpdate
in interfaceSwappableTable.LocalTableUpdateListener
- Parameters:
localTable
- table
-
getValueColumn
- Returns:
- the value column
-
getPlotInfo
- Returns:
- the plot info
-
onClose
public void onClose()Cleans up table references and listeners. -
convertTableValue
The value in the table is read as an object and must be converted to the parameterized type T- Parameters:
o
- table value- Returns:
o
converted to type T
-
onNullLocalTable
protected abstract void onNullLocalTable()Called inonLocalTableUpdate(com.illumon.iris.db.tables.Table)
when the table parameter is null. -
redraw
protected void redraw()Redraw the chart. Delegated to theOneClickChartModifier.VisibilityRestricter
by default. -
modifyChart
Modifies the chart with thecolumnValue
- Parameters:
columnValue
- the value in row 0 of the table from the OneClick event
-