public interface SurfaceFactory<P,A>
Modifier and Type | Method and Description |
---|---|
A |
createAspect(P profile,
ConfigMap aspectConfig,
Range[] ranges)
Creates an aspect from configuration information.
|
Navigator<A> |
createNavigator(ConfigMap navigatorConfig)
Creates a navigator from configuration information.
|
P |
createProfile(ConfigMap config)
Creates a profile that can be used when creating a plot surface.
|
Surface |
createSurface(java.awt.Rectangle plotBounds,
P profile,
A 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.
|
Range[] |
readRanges(P profile,
PlotLayer[] layers,
DataStore dataStore)
Provides the ranges that may be passed to
createAspect . |
boolean |
useRanges(P profile,
ConfigMap aspectConfig)
Indicates whether ranges should be provided to generate an aspect.
|
Surface createSurface(java.awt.Rectangle plotBounds, P profile, A aspect)
plotBounds
- rectangle to containing actual plot data
(not insets)profile
- configuration object defining plot styleaspect
- configuration object defining plot viewpointConfigKey[] getProfileKeys()
createProfile
method.P createProfile(ConfigMap config)
getProfileKeys
.
The return value can be used as input to
createSurface
and other methods in this class.config
- map of profile configuration itemsConfigKey[] getAspectKeys()
useRanges
and
createAspect
methods.boolean useRanges(P profile, ConfigMap aspectConfig)
readRanges
to createAspect
alongside the arguments of this method.
If false, any such ranges will be ignored.profile
- surface configuration profileaspectConfig
- configuration map that may contain keys from
getAspectKeys
@Slow Range[] readRanges(P profile, PlotLayer[] layers, DataStore dataStore)
createAspect
.
There is only any point calling this if useRanges
returns true.profile
- surface configuration profilelayers
- plot layers to be plotteddataStore
- contains actual dataA createAspect(P profile, ConfigMap aspectConfig, Range[] ranges)
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
.profile
- surface configuration profileaspectConfig
- configuration map that may contain keys from
getAspectKeys
ranges
- range data filled in from layers, or nullConfigKey[] getNavigatorKeys()
createNavigator(uk.ac.starlink.ttools.plot2.config.ConfigMap)
method.Navigator<A> createNavigator(ConfigMap navigatorConfig)
navigatorConfig
- configuration map that may contain keys from
getNavigatorKeys
Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.