Package uk.ac.starlink.topcat.activate

## Class SkyPosConfigurator

- java.lang.Object
- - uk.ac.starlink.topcat.activate.AbstractActivatorConfigurator
  - - uk.ac.starlink.topcat.activate.SkyPosConfigurator

- All Implemented Interfaces:
    `ActivatorConfigurator`
  Direct Known Subclasses:
    `Hips2fitsConfigurator`

      public abstract class SkyPosConfigurator
      extends AbstractActivatorConfigurator

  Partial ActivatorConfigurator implementation for activators that do something with sky position columns.
  Since:
    29 Mar 2018
  Author:
    Mark Taylor

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `protected static class` | `SkyPosConfigurator.SkyPosActivator` | Partial activator implementation for use with SkyPosConfigurator.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `SkyPosConfigurator​(TopcatModelInfo tinfo)` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected abstract Activator` | `createActivator​(uk.ac.starlink.table.ColumnData raData, uk.ac.starlink.table.ColumnData decData)` | Constructs an Activator based on selected RA and Dec column values.
    `Activator` | `getActivator()` | Constructs an activator in accordance with the current state of this GUI.
    `java.lang.String` | `getConfigMessage()` | Returns a short status message for display to the user.
    `protected abstract java.lang.String` | `getSkyConfigMessage()` | Returns a config message given that non-blank sky position columns have been supplied.
    `protected ConfigState` | `getSkyPosState()` | Returns a partial config state, giving the current configuration of the sky position components.
    `uk.ac.starlink.table.gui.LabelledComponentStack` | `getStack()` | Returns the component stack in which the RA and Dec selectors are placed.
    `protected void` | `setSkyPosState​(ConfigState state)` | Restores the sky position configuration of this configurator from a stored state object.

    - ### Methods inherited from class uk.ac.starlink.topcat.activate.AbstractActivatorConfigurator

      `addActionListener, createDisplayField, createDisplayLabel, getActionForwarder, getPanel, 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.activate.ActivatorConfigurator

      `getSafety, getState, setState`

- - ### Constructor Detail

    - #### SkyPosConfigurator

          protected SkyPosConfigurator​(TopcatModelInfo tinfo)

      Constructor.
      Parameters:
        `tinfo` - topcat model information

  - ### Method Detail

    - #### getStack

          public uk.ac.starlink.table.gui.LabelledComponentStack getStack()

      Returns the component stack in which the RA and Dec selectors are placed.
      Returns:
        component stack

    - #### createActivator

          protected abstract Activator createActivator​(uk.ac.starlink.table.ColumnData raData,
                                                       uk.ac.starlink.table.ColumnData decData)

      Constructs an Activator based on selected RA and Dec column values.
      Parameters:
        `raData` - right ascension in radians
        `decData` - declination in radians
      Returns:
        new activator

    - #### getSkyConfigMessage

          protected abstract java.lang.String getSkyConfigMessage()

      Returns a config message given that non-blank sky position columns have been supplied.
      Returns:
        reason why activator is not supplied, or null

    - #### getActivator

          public Activator getActivator()

      Description copied from interface: `ActivatorConfigurator`
      Constructs an activator in accordance with the current state of this GUI. If the current state not an adequate specification, null may be returned. In that case, the getConfigMessage method should generally provide an explanation.

      This method may be called often, so should be cheap to invoke. The idea is that it will be called immediately before the activator is used, so the returned object may fix, rather than arrange to gather at a later date, information acquired from the GUI.

      Returns:
        currently configured activator, or null
      See Also:
        `ActivatorConfigurator.getConfigMessage()`

    - #### getConfigMessage

          public java.lang.String getConfigMessage()

      Description copied from interface: `ActivatorConfigurator`
      Returns a short status message for display to the user. This is supposed to be a comment, if one is needed, on the current state of the configuration.

      As a rule, exactly one of this method and the `getActivator` should return null. If there is no activator, this method should return some reason why the configuration is incorrect or incomplete, and otherwise it should return null.

      Returns:
        message, typically indicating configuration problems, or null

    - #### getSkyPosState

          protected ConfigState getSkyPosState()

      Returns a partial config state, giving the current configuration of the sky position components.
      Returns:
        sky position state

    - #### setSkyPosState

          protected void setSkyPosState​(ConfigState state)

      Restores the sky position configuration of this configurator from a stored state object.
      Parameters:
        `state` - sky position state