public class MatrixPositionCoordPanel extends SimplePositionCoordPanel
BasicCoordPanel.CoordStack
Constructor and Description |
---|
MatrixPositionCoordPanel()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
autoPopulate()
Makes some attempt to fill in the fields with non-blank values.
|
uk.ac.starlink.ttools.plot2.data.Coord[] |
getAdditionalManagedCoords()
Returns a list of coordinates which do not correspond to the
selectors displayed here, but which should not be acquired by
other means.
|
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.
|
List<uk.ac.starlink.util.Bi<String,JComponent>> |
getExtraTabs()
Returns definitions for additional tabs to add alongside the
main Position tab in the FormLayerControl.
|
int |
getVisibleCoordCount()
Returns the number of coordinate entry fields currently visible.
|
boolean |
isPreferredCoord(uk.ac.starlink.ttools.plot2.data.Coord coord)
Indicates whether a coordinate is one that ought to get filled in
if possible.
|
void |
setTable(TopcatModel tcModel,
boolean autoFill)
Sets the table with reference to which this panel will resolve
coordinate descriptions.
|
createPanel, getDataGeom
addActionListener, addButtons, createDefaultStack, getActionForwarder, getColumnSelector, getComponent, getConfig, getConfigSpecifier, getInfos, getStack, getTable, multiplyCoords, populate, removeActionListener, setColumnSelector
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addActionListener, getColumnSelector, getComponent, getConfig, getConfigSpecifier, removeActionListener
public int getVisibleCoordCount()
public List<uk.ac.starlink.util.Bi<String,JComponent>> getExtraTabs()
PositionCoordPanel
public boolean isPreferredCoord(uk.ac.starlink.ttools.plot2.data.Coord coord)
BasicCoordPanel
Coord.isRequired()
,
but subclasses can override this if more nuanced behaviour is necessary.
In particular in order for autopopulation to work correctly, it may be necessary to return true for all members of a group of coordinates for which at least one has to be filled in for a viable plot.
isPreferredCoord
in class BasicCoordPanel
coord
- candidate coordinatepublic void autoPopulate()
BasicCoordPanel
autoPopulate
in class BasicCoordPanel
public uk.ac.starlink.ttools.plot2.data.Coord[] getCoords()
BasicCoordPanel
getCoords
in interface CoordPanel
getCoords
in class BasicCoordPanel
public uk.ac.starlink.ttools.plot2.data.Coord[] getAdditionalManagedCoords()
BasicCoordPanel
This is a hack to work round situations when coordinates are added into results by non-obvious means. In most cases the output result will be an empty array, which is what the implementation in this class does. But subclasses can override it for special behaviour.
getAdditionalManagedCoords
in interface CoordPanel
getAdditionalManagedCoords
in class BasicCoordPanel
public GuiCoordContent[] getContents()
BasicCoordPanel
required
coord values are filled in)
then null will be returned.getContents
in interface CoordPanel
getContents
in class BasicCoordPanel
public void setTable(TopcatModel tcModel, boolean autoFill)
BasicCoordPanel
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.
setTable
in interface CoordPanel
setTable
in class BasicCoordPanel
tcModel
- table from which coordinate values will be drawnautoFill
- whether to autopopulate columns when old ones
can't be used or are absentCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.