Package uk.ac.starlink.topcat.plot2
Class MultiGeomPositionCoordPanel
java.lang.Object
uk.ac.starlink.topcat.plot2.MultiGeomPositionCoordPanel
- All Implemented Interfaces:
CoordPanel,PositionCoordPanel
PositionCoordPanel implementation that offers a choice of DataGeoms.
- Since:
- 22 Jan 2024
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionMultiGeomPositionCoordPanel(int npos, Map<uk.ac.starlink.ttools.plot2.DataGeom, CoordSpotter[]> geomMap) Constructs a MultiGeomPositionCoordPanel with CoordSpotters.MultiGeomPositionCoordPanel(int npos, uk.ac.starlink.ttools.plot2.DataGeom[] geoms) Constructs a MultiGeomPositionCoordPanel without CoordSpotters. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddActionListener(ActionListener listener) Adds a listener which will be notified when the coordinate selection changes.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.getColumnSelector(int ic, int iu) Returns the selector component model for a given user coordinate.Returns the graphical component for this object.Returns this panel's config specifier.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.uk.ac.starlink.ttools.plot2.DataGeomReturns the position geometry that defines the mapping of input to data coordinates.List<uk.ac.starlink.util.Bi<String, JComponent>> Returns definitions for additional tabs to add alongside the main Position tab in the FormLayerControl.voidremoveActionListener(ActionListener listener) Removes a listener which was added previously.voidsetTable(TopcatModel tcModel, boolean autoPopulate) Sets the table with reference to which this panel will resolve coordinate descriptions.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface uk.ac.starlink.topcat.plot2.CoordPanel
getConfig
-
Constructor Details
-
MultiGeomPositionCoordPanel
public MultiGeomPositionCoordPanel(int npos, uk.ac.starlink.ttools.plot2.DataGeom[] geoms) Constructs a MultiGeomPositionCoordPanel without CoordSpotters.- Parameters:
npos- number of sets of positional coordinates to hostgeoms- DataGeom options
-
MultiGeomPositionCoordPanel
public MultiGeomPositionCoordPanel(int npos, Map<uk.ac.starlink.ttools.plot2.DataGeom, CoordSpotter[]> geomMap) Constructs a MultiGeomPositionCoordPanel with CoordSpotters. The supplied map defines the available geometry options, along with a list of CoordSpotters, if any, to be used with each of the geoms.- Parameters:
npos- number of sets of positional coordinates to hostgeomMap- map from geom to applicable CoordSpotters
-
-
Method Details
-
getComponent
Description copied from interface:CoordPanelReturns the graphical component for this object.- Specified by:
getComponentin interfaceCoordPanel- Returns:
- component
-
getDataGeom
public uk.ac.starlink.ttools.plot2.DataGeom getDataGeom()Description copied from interface:PositionCoordPanelReturns the position geometry that defines the mapping of input to data coordinates.- Specified by:
getDataGeomin interfacePositionCoordPanel- Returns:
- data geom
-
addActionListener
Description copied from interface:CoordPanelAdds a listener which will be notified when the coordinate selection changes.- Specified by:
addActionListenerin interfaceCoordPanel- Parameters:
listener- listener
-
removeActionListener
Description copied from interface:CoordPanelRemoves a listener which was added previously.- Specified by:
removeActionListenerin interfaceCoordPanel- Parameters:
listener- listener
-
setTable
Description copied from interface: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.- Specified by:
setTablein interfaceCoordPanel- Parameters:
tcModel- table from which coordinate values will be drawnautoPopulate- whether to autopopulate columns when old ones can't be used or are absent
-
getContents
Description copied from interface: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.- Specified by:
getContentsin interfaceCoordPanel- Returns:
- nCoord-element array of coord contents, or null
-
getColumnSelector
Description copied from interface:CoordPanelReturns the selector component model for a given user coordinate. If no columndata-specific model has been set, null may be returned.- Specified by:
getColumnSelectorin interfaceCoordPanel- Parameters:
ic- coord indexiu- user info index for the given coord- Returns:
- selector model, or null
-
getAdditionalManagedCoords
public uk.ac.starlink.ttools.plot2.data.Coord[] getAdditionalManagedCoords()Description copied from interface: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.
- Specified by:
getAdditionalManagedCoordsin interfaceCoordPanel- Returns:
- list of coords which this panel will arrange to provide values for in some non-standard way
-
getExtraTabs
Description copied from interface:PositionCoordPanelReturns definitions for additional tabs to add alongside the main Position tab in the FormLayerControl. In most cases an empty list will be returned.- Specified by:
getExtraTabsin interfacePositionCoordPanel- Returns:
- list of (TabName,TabContent) pairs to add
-
getCoords
public uk.ac.starlink.ttools.plot2.data.Coord[] getCoords()Description copied from interface:CoordPanelReturns the coordinates which this panel is getting values for.- Specified by:
getCoordsin interfaceCoordPanel- Returns:
- coords
-
getConfigSpecifier
Description copied from interface:CoordPanelReturns this panel's config specifier.- Specified by:
getConfigSpecifierin interfaceCoordPanel- Returns:
- specifier for config values, if there are any
-