uk.ac.starlink.ttools.plot2.config
Class RampKeySet

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.config.RampKeySet
All Implemented Interfaces:
KeySet<RampKeySet.Ramp>

public class RampKeySet
extends Object
implements KeySet<RampKeySet.Ramp>

KeySet for defining the characteristics of a colour ramp.

Since:
16 Sep 2014
Author:
Mark Taylor

Nested Class Summary
static interface RampKeySet.Ramp
          Defines ramp characteristics by aggregating a Shader and a Scaling.
 
Constructor Summary
RampKeySet(String axname, String axName, Shader[] shaders, Scaling dfltScaling, boolean hasDataclip)
          Constructor.
 
Method Summary
static ShadeAxisFactory createShadeAxisFactory(RampKeySet.Ramp ramp, Captioner captioner, String label, double crowding)
          Creates a ShadeAxisFactory for a given ramp.
 RampKeySet.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RampKeySet

public RampKeySet(String axname,
                  String axName,
                  Shader[] shaders,
                  Scaling dfltScaling,
                  boolean hasDataclip)
Constructor.

Parameters:
axname - short form of axis name, used in text parameter names
axName - long form of axis name, used in descriptions
shaders - array of preset shader options
dfltScaling - default scaling function
hasDataclip - true iff a data subrange key is to be included
Method Detail

getKeys

public ConfigKey[] getKeys()
Description copied from interface: KeySet
The config keys used to specify an object.

Specified by:
getKeys in interface KeySet<RampKeySet.Ramp>
Returns:
fixed list of config keys

createValue

public RampKeySet.Ramp createValue(ConfigMap config)
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 interface KeySet<RampKeySet.Ramp>
Parameters:
config - map for which the values corresponding to getKeys will be examined
Returns:
specified typed value

createShadeAxisFactory

public static ShadeAxisFactory createShadeAxisFactory(RampKeySet.Ramp ramp,
                                                      Captioner captioner,
                                                      String label,
                                                      double crowding)
Creates a ShadeAxisFactory for a given ramp.

Parameters:
ramp - ramp
captioner - shader ramp captioner
label - shader ramp label
crowding - tick crowding factor (1 is normal)
Returns:
new factory


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.