# Class RampKeySet

java.lang.Object
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

Nested Classes
Modifier and Type
Class
Description
`static interface`
`RampKeySet.Ramp`
Defines ramp characteristics by aggregating a Shader and a Scaling.

## Constructor Summary

Constructors
Constructor
Description
`RampKeySet(String axname, String axName, ClippedShader[] shaders, Scaling dfltScaling, boolean hasDataclip)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`static ShadeAxisFactory`
`createShadeAxisFactory(RampKeySet.Ramp ramp, Captioner captioner, String label, double crowding, int rampWidth)`
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.
`ClippedShader[]`
`getShaders()`
Returns an orderedlist of the shaders provided by this set.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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 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 Details

### 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

### getShaders

public ClippedShader[] 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` - ramp
  `captioner` - shader ramp captioner
  `label` - shader ramp label
  `crowding` - tick crowding factor (1 is normal)
  `rampWidth` - width of colour map ramp in pixels
Returns:
  new factory