Package uk.ac.starlink.topcat.plot2

## Class FormLayerControl

- java.lang.Object
- - uk.ac.starlink.topcat.plot2.TabberControl
  - - uk.ac.starlink.topcat.plot2.FormLayerControl

- All Implemented Interfaces:
    `Control`, `LayerControl`
  Direct Known Subclasses:
    `MultiFormLayerControl`, `SingleFormLayerControl`

      public abstract class FormLayerControl
      extends TabberControl
      implements LayerControl

  Plot layer control which manages coordinates and subsets in a common way for multiple layers defined by one or more forms. It provides a tab for common coordinates (including table) and a tab for configuring subset-specific defaults. Concrete subclasses must provide their form panels.
  Since:
    8 Jan 2014
  Author:
    Mark Taylor

- - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `FormLayerControl​(PositionCoordPanel posCoordPanel, uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId> zsel, boolean autoPopulate, NextSupplier nextSupplier, TopcatListener tcListener, javax.swing.Icon controlIcon)` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `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 abstract FormControl[]` | `getFormControls()` | Returns a list of all the form controls, active or not, currently managd by this layer control.
    `TopcatLayer[]` | `getLayers()` | Returns the layers contributed by this control.
    `uk.ac.starlink.ttools.plot2.LegendEntry[]` | `getLegendEntries()` | Returns legend entries associated with this control.
    `PositionCoordPanel` | `getPositionCoordPanel()` | Returns the panel in which positional coordinates are entered.
    `SubsetConfigManager` | `getSubsetManager()` | Returns this control's per-subset configuration manager.
    `SubsetStack` | `getSubsetStack()` | Returns this control's selectable stack of subsets.
    `TopcatModel` | `getTopcatModel()` | Returns the table for which this control is currently making plots.
    `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.
    `protected abstract boolean` | `isControlActive​(FormControl fc)` | Indicates whether a given form control is contributing the the plot on behalf of this layer control.
    `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.

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

      `addActionListener, getControlIcon, getPanel, removeActionListener`

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

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

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

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

- - ### Constructor Detail

    - #### FormLayerControl

          protected FormLayerControl​(PositionCoordPanel posCoordPanel,
                                     uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId> zsel,
                                     boolean autoPopulate,
                                     NextSupplier nextSupplier,
                                     TopcatListener tcListener,
                                     javax.swing.Icon controlIcon)

      Constructor.
      Parameters:
        `posCoordPanel` - panel for entering table and basic positional coordinates
        `zsel` - zone id specifier, may be null for single-zone plots
        `autoPopulate` - if true, when the table is changed an attempt will be made to initialise the coordinate fields with some suitable values
        `nextSupplier` - manages global dispensing for some style options
        `tcListener` - listener for TopcatEvents; this manager will arrange for it to listen to whatever is the currently selected TopcatModel
        `controlIcon` - icon for control stack

  - ### 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

    - #### getPositionCoordPanel

          public PositionCoordPanel getPositionCoordPanel()

      Returns the panel in which positional coordinates are entered.
      Returns:
        positional coordinate panel

    - #### getSubsetManager

          public SubsetConfigManager getSubsetManager()

      Returns this control's per-subset configuration manager.
      Returns:
        subset manager

    - #### getSubsetStack

          public SubsetStack getSubsetStack()

      Returns this control's selectable stack of subsets.
      Returns:
        subset stack

    - #### getFormControls

          protected abstract FormControl[] getFormControls()

      Returns a list of all the form controls, active or not, currently managd by this layer control.
      Returns:
        list of all form controls

    - #### isControlActive

          protected abstract boolean isControlActive​(FormControl fc)

      Indicates whether a given form control is contributing the the plot on behalf of this layer control.
      Parameters:
        `fc` - form control managed by this layer control
      Returns:
        true iff fc is active (contributing to plot)

    - #### getLayers

          public TopcatLayer[] getLayers()

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

    - #### 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

    - #### 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

    - #### 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

    - #### 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

    - #### getTopcatModel

          public TopcatModel getTopcatModel()

      Returns the table for which this control is currently making plots.
      Returns:
        topcat model

Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.