# Interface CoordPanel

All Known Subinterfaces:
  `PositionCoordPanel`

All Known Implementing Classes:
  `AreaCoordPanel, BasicCoordPanel, MatrixPositionCoordPanel, MultiGeomPositionCoordPanel, SimplePositionCoordPanel, XYArrayCoordPanel`

public interface CoordPanel
GUI component for entry of Coord values as table column expressions.

Since:
  13 Mar 2013
Author:
  Mark Taylor

## Method Summary

Modifier and Type
Method
Description
`void`
`addActionListener(ActionListener listener)`
Adds a listener which will be notified when the coordinate selection changes.
`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.
`ColumnDataComboBoxModel`
`getColumnSelector(int ic, int iu)`
Returns the selector component model for a given user coordinate.
`JComponent`
`getComponent()`
Returns the graphical component for this object.
`default uk.ac.starlink.ttools.plot2.config.ConfigMap`
`getConfig()`
Returns the config map associated with this panel.
`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(ActionListener listener)`
Removes a listener which was added previously.
`void`
`setTable(TopcatModel tcModel, boolean autoPopulate)`
Sets the table with reference to which this panel will resolve coordinate descriptions.

## Method Details

### getCoords

uk.ac.starlink.ttools.plot2.data.Coord[] getCoords()
Returns the coordinates which this panel is getting values for.

Returns:
  coords

### getConfigSpecifier

ConfigSpecifier getConfigSpecifier()
Returns this panel's config specifier.

Returns:
  specifier for config values, if there are any

### getComponent

JComponent getComponent()
Returns the graphical component for this object.

Returns:
  component

### addActionListener

void addActionListener(ActionListener listener)
Adds a listener which will be notified when the coordinate selection changes.

Parameters:
  `listener` - listener

### removeActionListener

void removeActionListener(ActionListener listener)
Removes a listener which was added previously.

Parameters:
  `listener` - listener

### setTable

void setTable(TopcatModel tcModel, boolean autoPopulate)
Sets 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 `autopopulate` parameter is set, some default columns will be used.

Parameters:
  `tcModel` - table from which coordinate values will be drawn
  `autoPopulate` - whether to autopopulate columns when old ones can't be used or are absent

### getContents

GuiCoordContent[] getContents()
Returns the coordinate values currently selected in this panel. If there is insufficient information to contribute to a plot (not all of the `required` coord values are filled in) then null will be returned.

Returns:
  nCoord-element array of coord contents, or null

### getColumnSelector

ColumnDataComboBoxModel getColumnSelector(int ic, int iu)
Returns the selector component model for a given user coordinate. If no columndata-specific model has been set, null may be returned.

Parameters:
  `ic` - coord index
  `iu` - user info index for the given coord
Returns:
  selector model, or null

### getAdditionalManagedCoords

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.

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.

Returns:
  list of coords which this panel will arrange to provide values for in some non-standard way

### getConfig

default uk.ac.starlink.ttools.plot2.config.ConfigMap getConfig()
Returns the config map associated with this panel.

Returns:
  result of `getConfigSpecifier().getSpecifiedValue()`