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
Partial ActivatorConfigurator implementation for activators that
do something with sky position columns.
- Since:
- 29 Mar 2018
- Author:
- Mark Taylor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Partial activator implementation for use with SkyPosConfigurator. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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.Constructs an activator in accordance with the current state of this GUI.Returns a short status message for display to the user.protected abstract String
Returns a config message given that non-blank sky position columns have been supplied.protected ConfigState
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 Details
-
SkyPosConfigurator
Constructor.- Parameters:
tinfo
- topcat model information
-
-
Method Details
-
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 radiansdecData
- declination in radians- Returns:
- new activator
-
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
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:
-
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
Returns a partial config state, giving the current configuration of the sky position components.- Returns:
- sky position state
-
setSkyPosState
Restores the sky position configuration of this configurator from a stored state object.- Parameters:
state
- sky position state
-