Class RampKeySet
java.lang.Object
uk.ac.starlink.ttools.plot2.config.RampKeySet
- All Implemented Interfaces:
KeySet<RampKeySet.Ramp>
KeySet for defining the characteristics of a colour ramp.
- Since:
- 16 Sep 2014
- Author:
- Mark Taylor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Defines ramp characteristics by aggregating a Shader and a Scaling. -
Constructor Summary
ConstructorsConstructorDescriptionRampKeySet
(String axname, String axName, ClippedShader[] shaders, Scaling dfltScaling, boolean hasDataclip) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic ShadeAxisFactory
createShadeAxisFactory
(RampKeySet.Ramp ramp, Captioner captioner, String label, double crowding, int rampWidth) Creates a ShadeAxisFactory for a given ramp.createValue
(ConfigMap config) Creates a typed value based on the values in a map corresponding to this object's keys.ConfigKey<?>[]
getKeys()
The config keys used to specify an object.Returns an orderedlist of the shaders provided by this set.
-
Constructor Details
-
RampKeySet
public RampKeySet(String axname, String axName, ClippedShader[] shaders, Scaling dfltScaling, boolean hasDataclip) Constructor.- Parameters:
axname
- short form of axis name, used in text parameter namesaxName
- long form of axis name, used in descriptionsshaders
- array of preset shader optionsdfltScaling
- default scaling functionhasDataclip
- true iff a data subrange key is to be included
-
-
Method Details
-
getKeys
Description copied from interface:KeySet
The config keys used to specify an object.- Specified by:
getKeys
in interfaceKeySet<RampKeySet.Ramp>
- Returns:
- fixed list of config keys
-
createValue
Description copied from interface:KeySet
Creates a typed value based on the values in a map corresponding to this object's keys.- Specified by:
createValue
in interfaceKeySet<RampKeySet.Ramp>
- Parameters:
config
- map for which the values corresponding togetKeys
will be examined- Returns:
- specified typed value
-
getShaders
Returns an orderedlist of the shaders provided by this set.- Returns:
- shaders
-
createShadeAxisFactory
public static ShadeAxisFactory createShadeAxisFactory(RampKeySet.Ramp ramp, Captioner captioner, String label, double crowding, int rampWidth) Creates a ShadeAxisFactory for a given ramp.- Parameters:
ramp
- rampcaptioner
- shader ramp captionerlabel
- shader ramp labelcrowding
- tick crowding factor (1 is normal)rampWidth
- width of colour map ramp in pixels- Returns:
- new factory
-