# Class Hips2fitsConfigurator

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

All Implemented Interfaces:
  `ActivatorConfigurator`

public abstract class Hips2fitsConfigurator extends SkyPosConfigurator
Partial ActivatorConfigurator implementation for activators that will use the CDS Hips2fits service. This class manages the UI components required to select a HiPS survey and make cutout queries on it.

Since:
  22 Oct 2019
Author:
  Mark Taylor

## Nested Class Summary

### Nested classes/interfaces inherited from class SkyPosConfigurator

`SkyPosConfigurator.SkyPosActivator`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`Hips2fitsConfigurator(TopcatModelInfo tinfo, Predicate<HipsSurvey> filter)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`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.
`Safety`
`getSafety()`
Indicates whether an activator created by the current state of this configurator is known to be harmless.
`String`
`getSkyConfigMessage()`
Returns a config message given that non-blank sky position columns have been supplied.
`ConfigState`
`getState()`
Returns an object that contains the current state of this configurator.
`void`
`setState(ConfigState state)`
Restores the state of this object from a given state object.
`protected abstract Outcome`
`useHips(String hipsId, double raDeg, double decDeg, double fovDeg, int npix)`
Invoked on activation with the configured HiPS details.

### Methods inherited from class SkyPosConfigurator

`getActivator, getConfigMessage, getSkyPosState, getStack, setSkyPosState`

### Methods inherited from class AbstractActivatorConfigurator

`addActionListener, createDisplayField, createDisplayLabel, getActionForwarder, getPanel, removeActionListener`

### Methods inherited from class Object

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

## Constructor Details

### Hips2fitsConfigurator

protected Hips2fitsConfigurator(TopcatModelInfo tinfo, Predicate<HipsSurvey> filter)
Constructor.

Parameters:
  `tinfo` - topcat model information
  `filter` - indicates which Hips image surveys are suitable

## Method Details

### useHips

protected abstract Outcome useHips(String hipsId, double raDeg, double decDeg, double fovDeg, int npix)
Invoked on activation with the configured HiPS details.

Parameters:
  `hipsId` - hips survey ID or match string
  `raDeg` - RA position in degrees
  `decDeg` - Dec position in degrees
  `fovDeg` - field of view in degrees
  `npix` - linear dimension of cutout in pixels
Returns:
  outcome

### getSafety

public Safety getSafety()
Description copied from interface: `ActivatorConfigurator`
Indicates whether an activator created by the current state of this configurator is known to be harmless.

Implementations should be cautious; if some slightly adjusted state might be dangerous, false could be returned as well (that's why this method is on ActivatorConfigurator and not Activator itself).

Returns:
  safety status of the currently configured state

### getState

public ConfigState getState()
Description copied from interface: `ActivatorConfigurator`
Returns an object that contains the current state of this configurator. This includes options selected by the user, but does not include any description of the table on which this configurator is working.

Returns:
  configuration state

### setState

public void setState(ConfigState state)
Description copied from interface: `ActivatorConfigurator`
Restores the state of this object from a given state object.

Parameters:
  `state` - stored state

### createActivator

public Activator createActivator(uk.ac.starlink.table.ColumnData raData, uk.ac.starlink.table.ColumnData decData)
Description copied from class: `SkyPosConfigurator`
Constructs an Activator based on selected RA and Dec column values.

Specified by:
  `createActivator` in class `SkyPosConfigurator`
Parameters:
  `raData` - right ascension in radians
  `decData` - declination in radians
Returns:
  new activator

### getSkyConfigMessage

public String getSkyConfigMessage()
Description copied from class: `SkyPosConfigurator`
Returns a config message given that non-blank sky position columns have been supplied.

Specified by:
  `getSkyConfigMessage` in class `SkyPosConfigurator`
Returns:
  reason why activator is not supplied, or null