Package uk.ac.starlink.topcat.plot2

## Class BasicCoordLayerControl

- java.lang.Object
- - uk.ac.starlink.topcat.plot2.TabberControl
  - - uk.ac.starlink.topcat.plot2.ConfigControl
    - - uk.ac.starlink.topcat.plot2.BasicCoordLayerControl

- All Implemented Interfaces:
    `Configger`, `Control`, `LayerControl`
  Direct Known Subclasses:
    `HealpixLayerControl`, `SpectrogramLayerControl`

      public class BasicCoordLayerControl
      extends ConfigControl
      implements LayerControl

  LayerControl for a single plotter with coordinates.
  Since:
    25 Nov 2013
  Author:
    Mark Taylor

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `BasicCoordLayerControl​(uk.ac.starlink.ttools.plot2.Plotter<?> plotter, uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId> zsel, PositionCoordPanel coordPanel, javax.swing.ListModel<TopcatModel> tablesModel, Configger baseConfigger, boolean autoPopulate)` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `uk.ac.starlink.ttools.plot2.config.ConfigMap` | `getConfig()` | Returns a single config map containing all of the config information gathered by this control.
    `java.lang.String` | `getControlLabel()` | Returns a short string to label this control, visible in the stack.
    `java.lang.String` | `getCoordLabel​(java.lang.String userCoordName)` | Returns a text label associated with one of the user coords for this control, typically the name of the column or expression supplying the data.
    `protected PositionCoordPanel` | `getCoordPanel()` | Returns the coord panel.
    `TopcatLayer[]` | `getLayers()` | Returns the layers contributed by this control.
    `uk.ac.starlink.ttools.plot2.LegendEntry[]` | `getLegendEntries()` | Returns legend entries associated with this control.
    `TablesListComboBox` | `getTableSelector()` | Returns the selection widget for choosing which table this control is working with.
    `uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId>` | `getZoneSpecifier()` | Returns a specifier that determines which zone of a multi-zone plot this control's layers will be displayed in.
    `void` | `setTopcatModel​(TopcatModel tcModel)` | Sets in the GUI the topcat model for which this control is making plots.
    `void` | `submitReports​(java.util.Map<LayerId,​uk.ac.starlink.ttools.plot2.ReportMap> reports)` | Accepts report information generated by plotting layers.
    `protected void` | `tableChanged​(TopcatModel tcModel)` | Called when the TopcatModel for which this control is generating plots is changed.

    - ### Methods inherited from class uk.ac.starlink.topcat.plot2.ConfigControl

      `addSpecifierTab, getConfigSpecifiers`

    - ### Methods inherited from class uk.ac.starlink.topcat.plot2.TabberControl

      `addActionListener, addControlTab, addZoneTab, getActionForwarder, getControlIcon, getPanel, getTabber, removeActionListener`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface uk.ac.starlink.topcat.plot2.Control

      `addActionListener, getControlIcon, getPanel, removeActionListener`

- - ### Constructor Detail

    - #### BasicCoordLayerControl

          public BasicCoordLayerControl​(uk.ac.starlink.ttools.plot2.Plotter<?> plotter,
                                        uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId> zsel,
                                        PositionCoordPanel coordPanel,
                                        javax.swing.ListModel<TopcatModel> tablesModel,
                                        Configger baseConfigger,
                                        boolean autoPopulate)

      Constructor.
      Parameters:
        `plotter` - plotter
        `zsel` - zone id specifier, may be null for single-zone case
        `coordPanel` - panel which displays the plotter's coordinates, and supplies a DataGeom
        `tablesModel` - list of available tables
        `baseConfigger` - provides global configuration info
        `autoPopulate` - if true, when the table is changed an attempt will be made to initialise the coordinate fields with some suitable values

  - ### Method Detail

    - #### getControlLabel

          public java.lang.String getControlLabel()

      Description copied from interface: `Control`
      Returns a short string to label this control, visible in the stack.
      Specified by:
        `getControlLabel` in interface `Control`
      Overrides:
        `getControlLabel` in class `TabberControl`
      Returns:
        label

    - #### getLayers

          public TopcatLayer[] getLayers()

      Description copied from interface: `LayerControl`
      Returns the layers contributed by this control.
      Specified by:
        `getLayers` in interface `LayerControl`
      Returns:
        layers

    - #### getCoordLabel

          public java.lang.String getCoordLabel​(java.lang.String userCoordName)

      Description copied from interface: `LayerControl`
      Returns a text label associated with one of the user coords for this control, typically the name of the column or expression supplying the data. Null may be returned if there's no good answer.
      Specified by:
        `getCoordLabel` in interface `LayerControl`
      Parameters:
        `userCoordName` - name of one of the user value infos of an input coord for this control
      Returns:
        text label associated with user coordinate

    - #### getLegendEntries

          public uk.ac.starlink.ttools.plot2.LegendEntry[] getLegendEntries()

      Description copied from interface: `LayerControl`
      Returns legend entries associated with this control.
      Specified by:
        `getLegendEntries` in interface `LayerControl`
      Returns:
        legend entries

    - #### getZoneSpecifier

          public uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId> getZoneSpecifier()

      Description copied from interface: `LayerControl`
      Returns a specifier that determines which zone of a multi-zone plot this control's layers will be displayed in. If this control is known to be used in a single-zone context, null should be returned.
      Specified by:
        `getZoneSpecifier` in interface `LayerControl`
      Returns:
        zone id specifier, or null

    - #### getTableSelector

          public TablesListComboBox getTableSelector()

      Description copied from interface: `LayerControl`
      Returns the selection widget for choosing which table this control is working with. If this control does not use a table, null is returned. The assumption is (currently) that a given control uses a maximum of one table.
      Specified by:
        `getTableSelector` in interface `LayerControl`
      Returns:
        table selector, or null

    - #### getConfig

          public uk.ac.starlink.ttools.plot2.config.ConfigMap getConfig()

      Description copied from class: `ConfigControl`
      Returns a single config map containing all of the config information gathered by this control. The returned map is the union of all the configs gathered from the specifiers added by the `addSpecifierTab` method.
      Specified by:
        `getConfig` in interface `Configger`
      Overrides:
        `getConfig` in class `ConfigControl`
      Returns:
        all configuration information gathered by this control

    - #### submitReports

          public void submitReports​(java.util.Map<LayerId,​uk.ac.starlink.ttools.plot2.ReportMap> reports)

      Description copied from interface: `LayerControl`
      Accepts report information generated by plotting layers. The submitted map may contain entries unrelated to this layer. Null map values are permitted, with the same meaning as an empty map.
      Specified by:
        `submitReports` in interface `LayerControl`
      Parameters:
        `reports` - per-layer plot reports for layers generated on behalf of this and possibly other controls

    - #### setTopcatModel

          public void setTopcatModel​(TopcatModel tcModel)

      Sets in the GUI the topcat model for which this control is making plots.
      Parameters:
        `tcModel` - new topcat model

    - #### getCoordPanel

          protected PositionCoordPanel getCoordPanel()

      Returns the coord panel.
      Returns:
        coord panel

    - #### tableChanged

          protected void tableChanged​(TopcatModel tcModel)

      Called when the TopcatModel for which this control is generating plots is changed. Usually this will be because the user has selected a new table from the table selector.
      Parameters:
        `tcModel` - new topcat model, may be null