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 enumAt what level in the Figure hierarchy the series of a plot will be restricted, e.g.static interfaceHides 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 TThe value in the table is read as an object and must be converted to the parameterized type Tprotected abstract voidmodifyChart(T columnValue) Modifies the chart with thecolumnValuevoidonClose()Cleans up table references and listeners.voidonLocalTableUpdate(Table localTable) Updates this listener with the new table.protected abstract voidCalled inonLocalTableUpdate(com.illumon.iris.db.tables.Table)when the table parameter is null.protected voidredraw()Redraw the chart.voidsetGovernor(LambdaGovernor governor) voidsetVisibilityRestricter(OneClickChartModifier.VisibilityRestricter visibilityRestricter) 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.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.LocalTableUpdateListenerto 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.LocalTableUpdateListenerUpdates this listener with the new table.- Specified by:
onLocalTableUpdatein 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:
oconverted 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.VisibilityRestricterby default. -
modifyChart
Modifies the chart with thecolumnValue- Parameters:
columnValue- the value in row 0 of the table from the OneClick event
-