Class MatrixPositionCoordPanel
- Since:
- 20 Sep 2023
- Author:
- Mark Taylor
-
Nested Class Summary
Nested classes/interfaces inherited from class uk.ac.starlink.topcat.plot2.CoordPanel
CoordPanel.CoordStack -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMakes some attempt to fill in the fields with non-blank values.uk.ac.starlink.ttools.plot2.data.Coord[]Returns a list of coordinates which do not correspond to the selectors displayed here, but which should not be acquired by other means.Returns the coordinate values currently selected in this panel.uk.ac.starlink.ttools.plot2.data.Coord[]Returns the coordinates which this panel is getting values for.List<uk.ac.starlink.util.Bi<String,JComponent>> Returns definitions for additional tabs to add alongside the main Position tab in the FormLayerControl.intReturns the number of coordinate entry fields currently visible.booleanisPreferredCoord(uk.ac.starlink.ttools.plot2.data.Coord coord) Indicates whether a coordinate is one that ought to get filled in if possible.voidsetTable(TopcatModel tcModel, boolean autoFill) Sets the table with reference to which this panel will resolve coordinate descriptions.Methods inherited from class uk.ac.starlink.topcat.plot2.SimplePositionCoordPanel
createPanel, getDataGeomMethods inherited from class uk.ac.starlink.topcat.plot2.PositionCoordPanel
multiplyCoordsMethods inherited from class uk.ac.starlink.topcat.plot2.CoordPanel
addActionListener, addButtons, createDefaultStack, getActionForwarder, getColumnSelector, getComponent, getConfig, getConfigSpecifier, getInfos, getStack, getTable, populate, removeActionListener, setColumnSelector
-
Constructor Details
-
MatrixPositionCoordPanel
public MatrixPositionCoordPanel()Constructor.
-
-
Method Details
-
getVisibleCoordCount
public int getVisibleCoordCount()Returns the number of coordinate entry fields currently visible.- Returns:
- number of coord entry fields
-
getExtraTabs
Description copied from class:PositionCoordPanelReturns definitions for additional tabs to add alongside the main Position tab in the FormLayerControl. In most cases an empty list will be returned.- Overrides:
getExtraTabsin classPositionCoordPanel- Returns:
- list of (TabName,TabContent) pairs to add
-
isPreferredCoord
public boolean isPreferredCoord(uk.ac.starlink.ttools.plot2.data.Coord coord) Description copied from class:CoordPanelIndicates whether a coordinate is one that ought to get filled in if possible. The CoordPanel implementation simply returns coord.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.
- Overrides:
isPreferredCoordin classCoordPanel- Parameters:
coord- candidate coordinate- Returns:
- true if we should try hard to get a value
-
autoPopulate
public void autoPopulate()Description copied from class:CoordPanelMakes some attempt to fill in the fields with non-blank values. The default implementation fills in the first few suitable columns, but subclasses are encouraged to override this behaviour if something smarter is possible.- Overrides:
autoPopulatein classCoordPanel
-
getCoords
public uk.ac.starlink.ttools.plot2.data.Coord[] getCoords()Description copied from class:CoordPanelReturns the coordinates which this panel is getting values for.- Overrides:
getCoordsin classCoordPanel- Returns:
- coords
-
getAdditionalManagedCoords
public uk.ac.starlink.ttools.plot2.data.Coord[] getAdditionalManagedCoords()Description copied from class:CoordPanelReturns a list of coordinates which do not correspond to the selectors displayed here, but which should not be acquired by other means.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.
- Overrides:
getAdditionalManagedCoordsin classCoordPanel- Returns:
- list of coords which this panel will arrange to provide values for in some non-standard way
-
getContents
Description copied from class:CoordPanelReturns the coordinate values currently selected in this panel. If there is insufficient information to contribute to a plot (not all of therequiredcoord values are filled in) then null will be returned.- Overrides:
getContentsin classCoordPanel- Returns:
- nCoord-element array of coord contents, or null
-
setTable
Description copied from class:CoordPanelSets the table with reference to which this panel will resolve coordinate descriptions.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
autopopulateparameter is set, some default columns will be used.- Overrides:
setTablein classCoordPanel- Parameters:
tcModel- table from which coordinate values will be drawnautoFill- whether to autopopulate columns when old ones can't be used or are absent
-