Package uk.ac.starlink.topcat.activate
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
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 uk.ac.starlink.topcat.activate.SkyPosConfigurator
SkyPosConfigurator.SkyPosActivator
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Hips2fitsConfigurator
(TopcatModelInfo tinfo, Predicate<HipsSurvey> filter) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncreateActivator
(uk.ac.starlink.table.ColumnData raData, uk.ac.starlink.table.ColumnData decData) Constructs an Activator based on selected RA and Dec column values.Indicates whether an activator created by the current state of this configurator is known to be harmless.Returns a config message given that non-blank sky position columns have been supplied.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
Invoked on activation with the configured HiPS details.Methods inherited from class uk.ac.starlink.topcat.activate.SkyPosConfigurator
getActivator, getConfigMessage, getSkyPosState, getStack, setSkyPosState
Methods inherited from class uk.ac.starlink.topcat.activate.AbstractActivatorConfigurator
addActionListener, createDisplayField, createDisplayLabel, getActionForwarder, getPanel, removeActionListener
-
Constructor Details
-
Hips2fitsConfigurator
Constructor.- Parameters:
tinfo
- topcat model informationfilter
- 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 stringraDeg
- RA position in degreesdecDeg
- Dec position in degreesfovDeg
- field of view in degreesnpix
- linear dimension of cutout in pixels- Returns:
- outcome
-
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
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
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 classSkyPosConfigurator
- Parameters:
raData
- right ascension in radiansdecData
- declination in radians- Returns:
- new activator
-
getSkyConfigMessage
Description copied from class:SkyPosConfigurator
Returns a config message given that non-blank sky position columns have been supplied.- Specified by:
getSkyConfigMessage
in classSkyPosConfigurator
- Returns:
- reason why activator is not supplied, or null
-