public class CoordPanel
extends java.lang.Object
Constructor and Description |
---|
CoordPanel(uk.ac.starlink.ttools.plot2.data.Coord[] coords)
Constructs a CoordPanel for selecting just Coords.
|
CoordPanel(uk.ac.starlink.ttools.plot2.data.Coord[] coords,
uk.ac.starlink.ttools.plot2.config.ConfigKey[] configKeys)
Constructs a CoordPanel for selecting Coords and Config values.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(java.awt.event.ActionListener listener)
Adds a listener which will be notified when the coordinate selection
changes.
|
void |
autoPopulate()
Makes some attempt to fill in the fields with non-blank values.
|
java.awt.event.ActionListener |
getActionForwarder()
Returns an object which will forward actions to listeners registered
with this panel.
|
ColumnDataComboBoxModel |
getColumnSelector(int ic,
int iu)
Returns the selector component model for a given user coordinate.
|
javax.swing.JComponent |
getComponent()
Returns the graphical component for this object.
|
ConfigSpecifier |
getConfigSpecifier()
Returns this panel's config specifier.
|
GuiCoordContent[] |
getContents()
Returns the coordinate values currently selected in this panel.
|
uk.ac.starlink.ttools.plot2.data.Coord[] |
getCoords()
Returns the coordinates which this panel is getting values for.
|
void |
removeActionListener(java.awt.event.ActionListener listener)
Removes a listener which was added previously.
|
void |
setColumnSelector(int ic,
int iu,
ColumnDataComboBoxModel model)
Resets the selector component model for a given user coordinate.
|
void |
setTable(TopcatModel tcModel,
boolean autoPopulate)
Sets the table with reference to which this panel will resolve
coordinate descriptions.
|
public CoordPanel(uk.ac.starlink.ttools.plot2.data.Coord[] coords)
coords
- coordinate definitions for which values are requiredpublic CoordPanel(uk.ac.starlink.ttools.plot2.data.Coord[] coords, uk.ac.starlink.ttools.plot2.config.ConfigKey[] configKeys)
coords
- coordinate definitions for which values are requiredconfigKeys
- config value keyspublic uk.ac.starlink.ttools.plot2.data.Coord[] getCoords()
public ConfigSpecifier getConfigSpecifier()
public javax.swing.JComponent getComponent()
public void addActionListener(java.awt.event.ActionListener listener)
listener
- listenerpublic void removeActionListener(java.awt.event.ActionListener listener)
listener
- listenerpublic java.awt.event.ActionListener getActionForwarder()
public void setTable(TopcatModel tcModel, boolean autoPopulate)
If the existing selected coordinate values still make sense
(if the new table has sufficiently compatible column names),
they are retained. If the columns cannot be retained they are
cleared, and in that case if the autopopulate
parameter
is set, some default columns will be used.
tcModel
- table from which coordinate values will be drawnautoPopulate
- whether to autopopulate columns when old ones
can't be used or are absentpublic void autoPopulate()
public GuiCoordContent[] getContents()
required
coord values are filled in)
then null will be returned.public ColumnDataComboBoxModel getColumnSelector(int ic, int iu)
ic
- coord indexiu
- user info index for the given coordpublic void setColumnSelector(int ic, int iu, ColumnDataComboBoxModel model)
ic
- coord indexiu
- user info index for the given coordmodel
- new selector modelCopyright © 2003-2017 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.