public abstract class FormControl extends java.lang.Object implements Control
Modifier | Constructor and Description |
---|---|
protected |
FormControl(Configger baseConfigger)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(java.awt.event.ActionListener listener)
Adds a listener to be messaged when the state of this control
changes in a way which might affect the plot layer it would create.
|
uk.ac.starlink.ttools.plot2.PlotLayer |
createLayer(uk.ac.starlink.ttools.plot2.DataGeom geom,
uk.ac.starlink.ttools.plot2.data.DataSpec dataSpec,
RowSubset subset)
Creates a plot layer given the current state of this control and
some additional information.
|
java.awt.event.ActionListener |
getActionForwarder()
Returns an object which will forward actions to listeners registered
with this panel.
|
protected abstract uk.ac.starlink.ttools.plot2.config.ConfigKey[] |
getConfigKeys()
Returns the keys defining the additional configuration required
by this control.
|
javax.swing.Icon |
getControlIcon()
Returns an icon to represent this control, visible in the stack.
|
java.lang.String |
getControlLabel()
Returns a short string to label this control, visible in the stack.
|
protected abstract javax.swing.JComponent |
getCoordPanel()
Returns the panel into which the user enters additional coordinate
information required for this control, if any.
|
abstract uk.ac.starlink.ttools.plot2.config.ConfigMap |
getExtraConfig()
Returns the additional configuration entered by the user in
this control.
|
abstract GuiCoordContent[] |
getExtraCoordContents()
Returns the data and metadata for the additional coordinates
entered by the user in this control.
|
javax.swing.JComponent |
getPanel()
Returns the GUI component that is the business end of this control.
|
protected abstract uk.ac.starlink.ttools.plot2.Plotter<?> |
getPlotter()
Returns the Plotter object which generates plot layers from the
information provided by this control
|
FormStylePanel |
getStylePanel()
Returns the style panel currently in use.
|
void |
removeActionListener(java.awt.event.ActionListener listener)
Removes a previously added listener.
|
protected abstract void |
setTable(TopcatModel tcModel)
Performs implementation-specific configuration of this control
for a given TopcatModel.
|
void |
setTable(TopcatModel tcModel,
SubsetConfigManager subManager,
SubsetStack subStack)
Configures this control for use with a given TopcatModel.
|
void |
submitReports(java.util.Map<RowSubset,uk.ac.starlink.ttools.plot2.ReportMap> reports)
Accepts plot reports generated by plotting layers.
|
protected FormControl(Configger baseConfigger)
baseConfigger
- provides global configuration infoprotected abstract javax.swing.JComponent getCoordPanel()
protected abstract uk.ac.starlink.ttools.plot2.Plotter<?> getPlotter()
protected abstract uk.ac.starlink.ttools.plot2.config.ConfigKey[] getConfigKeys()
public javax.swing.JComponent getPanel()
Control
public abstract GuiCoordContent[] getExtraCoordContents()
public abstract uk.ac.starlink.ttools.plot2.config.ConfigMap getExtraConfig()
public void setTable(TopcatModel tcModel, SubsetConfigManager subManager, SubsetStack subStack)
tcModel
- topcat modelsubManager
- subset manager with info about the row subsets
for tcModel
subStack
- subset stack controlling/displaying subset visibilityprotected abstract void setTable(TopcatModel tcModel)
tcModel
- new topcat model to installpublic FormStylePanel getStylePanel()
public uk.ac.starlink.ttools.plot2.PlotLayer createLayer(uk.ac.starlink.ttools.plot2.DataGeom geom, uk.ac.starlink.ttools.plot2.data.DataSpec dataSpec, RowSubset subset)
geom
- data position geometrydataSpec
- data specification, which must contain any data
required by this control's extra coords and be
set up for the given subsetsubset
- row subset in the current table for which the
layer is to be plottedpublic java.awt.event.ActionListener getActionForwarder()
public void addActionListener(java.awt.event.ActionListener listener)
addActionListener
in interface Control
listener
- listener to addpublic void removeActionListener(java.awt.event.ActionListener listener)
removeActionListener
in interface Control
listener
- to removepublic java.lang.String getControlLabel()
Control
getControlLabel
in interface Control
public javax.swing.Icon getControlIcon()
Control
getControlIcon
in interface Control
public void submitReports(java.util.Map<RowSubset,uk.ac.starlink.ttools.plot2.ReportMap> reports)
reports
- map of row subsets to plot reportsCopyright ? 2003-2017 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.