Package uk.ac.starlink.topcat.plot2
Class FunctionLayerControl
java.lang.Object
uk.ac.starlink.topcat.plot2.TabberControl
uk.ac.starlink.topcat.plot2.ConfigControl
uk.ac.starlink.topcat.plot2.FunctionLayerControl
- All Implemented Interfaces:
Configger
,Control
,LayerControl
Layer control for plotting functions.
- Since:
- 26 Mar 2013
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionFunctionLayerControl
(uk.ac.starlink.ttools.plot2.layer.FunctionPlotter plotter, uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId> zsel) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetCoordLabel
(String userCoordName) Returns a text label associated with one of the user coords for this control, typically the name of the column or expression supplying the data.getLayers
(uk.ac.starlink.ttools.plot2.Ganger<?, ?> ganger) Returns the layers contributed by this control.uk.ac.starlink.ttools.plot2.LegendEntry[]
Returns legend entries associated with this control.uk.ac.starlink.ttools.plot2.Plotter<?>[]
Returns a list of the plotters that will be used by this control to create layers.Returns the selection widget for choosing which table this control is working with.uk.ac.starlink.ttools.plot2.config.Specifier
<ZoneId> Returns a specifier that determines which zone of a multi-zone plot this control's layers will be displayed in.boolean
Indicates whether this control will yield any layers in its current state.void
submitReports
(Map<LayerId, uk.ac.starlink.ttools.plot2.ReportMap> reports, uk.ac.starlink.ttools.plot2.Ganger<?, ?> ganger) Accepts report information generated by plotting layers.Methods inherited from class uk.ac.starlink.topcat.plot2.ConfigControl
addSpecifierTab, getConfig, getConfigSpecifiers
Methods inherited from class uk.ac.starlink.topcat.plot2.TabberControl
addActionListener, addControlTab, addZoneTab, getActionForwarder, getControlIcon, getControlLabel, getPanel, getTabber, removeActionListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface uk.ac.starlink.topcat.plot2.Control
addActionListener, getControlIcon, getControlLabel, getPanel, removeActionListener
-
Constructor Details
-
FunctionLayerControl
public FunctionLayerControl(uk.ac.starlink.ttools.plot2.layer.FunctionPlotter plotter, uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId> zsel) Constructor.- Parameters:
plotter
- function plotterzsel
- zone id specifier, may be null for single-zone plots
-
-
Method Details
-
getPlotters
public uk.ac.starlink.ttools.plot2.Plotter<?>[] getPlotters()Description copied from interface:LayerControl
Returns a list of the plotters that will be used by this control to create layers.- Specified by:
getPlotters
in interfaceLayerControl
- Returns:
- list of active plotters
-
hasLayers
public boolean hasLayers()Description copied from interface:LayerControl
Indicates whether this control will yield any layers in its current state. It returns true ifgetLayers
will return a non-empty array. False positives are best avoided, but permitted.- Specified by:
hasLayers
in interfaceLayerControl
- Returns:
- true if there is a non-zero number of layers
-
getLayers
Description copied from interface:LayerControl
Returns the layers contributed by this control.- Specified by:
getLayers
in interfaceLayerControl
- Parameters:
ganger
- ganger within which layers will be used- Returns:
- layers
-
getLegendEntries
public uk.ac.starlink.ttools.plot2.LegendEntry[] getLegendEntries()Description copied from interface:LayerControl
Returns legend entries associated with this control.- Specified by:
getLegendEntries
in interfaceLayerControl
- Returns:
- legend entries
-
submitReports
public void submitReports(Map<LayerId, uk.ac.starlink.ttools.plot2.ReportMap> reports, uk.ac.starlink.ttools.plot2.Ganger<?, ?> ganger) Description copied from interface:LayerControl
Accepts report information generated by plotting layers. The submitted map may contain entries unrelated to this layer. Null map values are permitted, with the same meaning as an empty map.- Specified by:
submitReports
in interfaceLayerControl
- Parameters:
reports
- per-layer plot reports for layers generated on behalf of this and possibly other controlsganger
- ganger within which layers will be used
-
getZoneSpecifier
Description copied from interface:LayerControl
Returns a specifier that determines which zone of a multi-zone plot this control's layers will be displayed in. If this control is known to be used in a single-zone context, null should be returned.- Specified by:
getZoneSpecifier
in interfaceLayerControl
- Returns:
- zone id specifier, or null
-
getTableSelector
Description copied from interface:LayerControl
Returns the selection widget for choosing which table this control is working with. If this control does not use a table, null is returned. The assumption is (currently) that a given control uses a maximum of one table.- Specified by:
getTableSelector
in interfaceLayerControl
- Returns:
- table selector, or null
-
getCoordLabel
Description copied from interface:LayerControl
Returns a text label associated with one of the user coords for this control, typically the name of the column or expression supplying the data. Null may be returned if there's no good answer.- Specified by:
getCoordLabel
in interfaceLayerControl
- Parameters:
userCoordName
- name of one of the user value infos of an input coord for this control- Returns:
- text label associated with user coordinate
-