Class RampKeySet
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.config.RampKeySet
-
- All Implemented Interfaces:
KeySet<RampKeySet.Ramp>
public class RampKeySet extends java.lang.Object implements KeySet<RampKeySet.Ramp>
KeySet for defining the characteristics of a colour ramp.- Since:
- 16 Sep 2014
- Author:
- Mark Taylor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceRampKeySet.RampDefines ramp characteristics by aggregating a Shader and a Scaling.
-
Constructor Summary
Constructors Constructor Description RampKeySet(java.lang.String axname, java.lang.String axName, ClippedShader[] shaders, Scaling dfltScaling, boolean hasDataclip)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ShadeAxisFactorycreateShadeAxisFactory(RampKeySet.Ramp ramp, Captioner captioner, java.lang.String label, double crowding, int rampWidth)Creates a ShadeAxisFactory for a given ramp.RampKeySet.RampcreateValue(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.
-
-
-
Constructor Detail
-
RampKeySet
public RampKeySet(java.lang.String axname, java.lang.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 Detail
-
getKeys
public ConfigKey<?>[] getKeys()
Description copied from interface:KeySetThe config keys used to specify an object.- Specified by:
getKeysin interfaceKeySet<RampKeySet.Ramp>- Returns:
- fixed list of config keys
-
createValue
public RampKeySet.Ramp createValue(ConfigMap config)
Description copied from interface:KeySetCreates a typed value based on the values in a map corresponding to this object's keys.- Specified by:
createValuein interfaceKeySet<RampKeySet.Ramp>- Parameters:
config- map for which the values corresponding togetKeyswill be examined- Returns:
- specified typed value
-
createShadeAxisFactory
public static ShadeAxisFactory createShadeAxisFactory(RampKeySet.Ramp ramp, Captioner captioner, java.lang.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
-
-