public class SkySurfaceFactory extends java.lang.Object implements SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>
Modifier and Type | Class and Description |
---|---|
static class |
SkySurfaceFactory.Profile
Profile class which defines fixed configuration items for a SkySurface.
|
Modifier and Type | Field and Description |
---|---|
static ConfigKey<SkyAxisLabeller> |
AXISLABELLER_KEY
Config key to control axis label positioning.
|
static ConfigKey<java.lang.Double> |
CROWD_KEY
Config key to control tick mark crowding.
|
static ConfigKey<java.lang.Double> |
FOV_RADIUS_KEY
Config key for specifying aspect field of view, in degrees.
|
static ConfigKey<java.lang.Boolean> |
GRID_KEY
Config key to determine whether grid lines are drawn.
|
static ConfigKey<java.lang.Double> |
LAT_KEY
Config key for specifying aspect central latitude, in degrees.
|
static ConfigKey<java.lang.Double> |
LON_KEY
Config key for specifying aspect central longitude, in degrees.
|
static ConfigKey<Projection> |
PROJECTION_KEY
Config key for sky projection type.
|
static ConfigKey<java.lang.Boolean> |
REFLECT_KEY
Config key to determine whether longitude runs right to left.
|
static ConfigKey<java.lang.Boolean> |
SEX_KEY
Config key to determine whether sexagesimal coordinates are used.
|
static ConfigKey<SkySys> |
VIEWSYS_KEY
Config key for the sky system used for projecting the data.
|
Constructor and Description |
---|
SkySurfaceFactory() |
Modifier and Type | Method and Description |
---|---|
SkyAspect |
createAspect(SkySurfaceFactory.Profile profile,
ConfigMap config,
Range[] ranges)
Creates an aspect from configuration information.
|
Navigator<SkyAspect> |
createNavigator(ConfigMap navConfig)
Creates a navigator from configuration information.
|
SkySurfaceFactory.Profile |
createProfile(ConfigMap config)
Creates a profile that can be used when creating a plot surface.
|
Surface |
createSurface(java.awt.Rectangle plotBounds,
SkySurfaceFactory.Profile p,
SkyAspect aspect)
Returns a new plot surface.
|
ConfigKey[] |
getAspectKeys()
Returns the configuration keys that may be used to configure aspect
for this surface factory.
|
ConfigKey[] |
getNavigatorKeys()
Returns the configuration keys that may be used to configure
a navigator for use with this surface factory.
|
ConfigKey[] |
getProfileKeys()
Returns the configuration keys used to configure profile for this
surface factory.
|
static boolean |
isAllSky(Range[] vxyzRanges)
Determines whether a set of ranges of normalised data coordinates
cover enough of the full data cube (-1..+1 in each dimension)
to count as full sky coverage.
|
Range[] |
readRanges(SkySurfaceFactory.Profile profile,
PlotLayer[] layers,
DataStore dataStore)
Provides the ranges that may be passed to
createAspect . |
boolean |
useRanges(SkySurfaceFactory.Profile profile,
ConfigMap config)
Indicates whether ranges should be provided to generate an aspect.
|
public static final ConfigKey<Projection> PROJECTION_KEY
public static final ConfigKey<java.lang.Boolean> REFLECT_KEY
public static final ConfigKey<SkySys> VIEWSYS_KEY
public static final ConfigKey<java.lang.Boolean> GRID_KEY
public static final ConfigKey<java.lang.Double> CROWD_KEY
public static final ConfigKey<SkyAxisLabeller> AXISLABELLER_KEY
public static final ConfigKey<java.lang.Boolean> SEX_KEY
public static final ConfigKey<java.lang.Double> LON_KEY
public static final ConfigKey<java.lang.Double> LAT_KEY
public static final ConfigKey<java.lang.Double> FOV_RADIUS_KEY
public Surface createSurface(java.awt.Rectangle plotBounds, SkySurfaceFactory.Profile p, SkyAspect aspect)
SurfaceFactory
createSurface
in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>
plotBounds
- rectangle to containing actual plot data
(not insets)p
- configuration object defining plot styleaspect
- configuration object defining plot viewpointpublic ConfigKey[] getProfileKeys()
SurfaceFactory
createProfile
method.getProfileKeys
in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>
public SkySurfaceFactory.Profile createProfile(ConfigMap config)
SurfaceFactory
getProfileKeys
.
The return value can be used as input to
createSurface
and other methods in this class.createProfile
in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>
config
- map of profile configuration itemspublic ConfigKey[] getAspectKeys()
SurfaceFactory
useRanges
and
createAspect
methods.getAspectKeys
in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>
public boolean useRanges(SkySurfaceFactory.Profile profile, ConfigMap config)
SurfaceFactory
readRanges
to createAspect
alongside the arguments of this method.
If false, any such ranges will be ignored.useRanges
in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>
profile
- surface configuration profileconfig
- configuration map that may contain keys from
getAspectKeys
public SkyAspect createAspect(SkySurfaceFactory.Profile profile, ConfigMap config, Range[] ranges)
SurfaceFactory
useRanges
returns true.
It is legal to give the ranges argument as null in any case.
In all cases, the returned value must be non-null and usable by
createSurface
.createAspect
in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>
profile
- surface configuration profileconfig
- configuration map that may contain keys from
getAspectKeys
ranges
- range data filled in from layers, or nullpublic Range[] readRanges(SkySurfaceFactory.Profile profile, PlotLayer[] layers, DataStore dataStore)
SurfaceFactory
createAspect
.
There is only any point calling this if useRanges
returns true.readRanges
in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>
profile
- surface configuration profilelayers
- plot layers to be plotteddataStore
- contains actual datapublic ConfigKey[] getNavigatorKeys()
SurfaceFactory
SurfaceFactory.createNavigator(uk.ac.starlink.ttools.plot2.config.ConfigMap)
method.getNavigatorKeys
in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>
public Navigator<SkyAspect> createNavigator(ConfigMap navConfig)
SurfaceFactory
createNavigator
in interface SurfaceFactory<SkySurfaceFactory.Profile,SkyAspect>
navConfig
- configuration map that may contain keys from
getNavigatorKeys
public static boolean isAllSky(Range[] vxyzRanges)
vxyzRanges
- 3-element array giving data ranges for normalised
X,Y,Z coordinatesCopyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.