# Class StyleKeys

java.lang.Object
uk.ac.starlink.ttools.plot2.config.StyleKeys

public class StyleKeys extends Object
Contains many common config keys and associated utility methods.

Since:
  25 Feb 2013
Author:
  Mark Taylor

## Field Summary

Fields
Modifier and Type
Field
Description
`static final ConfigKey<Anchor>`
`ANCHOR`
Config key for text anchor positioning.
`static final ConfigKey<Boolean>`
`ANTIALIAS`
Config key for line antialiasing.
`static final ConfigKey<Boolean>`
`AUTOSCALE`
Config key for autoscale flag for markers in data space.
`static final ConfigKey<Boolean>`
`AUTOSCALE_PIX`
Config key for autoscale flag for markers in pixel space.
`static final ConfigKey<Double>`
`AUX_CROWD`
Config key for global aux axis tick crowding.
`static final ConfigKey<Color>`
`AUX_NULLCOLOR`
Config key for global aux null colour.
`static final ConfigKey<Double>`
`AUX_OPAQUE`
Config key for the opacity limit of global auxiliary shaded plots.
`static final RampKeySet`
`AUX_RAMP`
Config key set for global Aux axis colour ramp.
`static final ConfigKey<Color>`
`AUXLOCAL_NULLCOLOR`
Config key for non-global aux null colour.
`static final RampKeySet`
`AUXLOCAL_RAMP`
Config key set for non-global Aux axis colour ramp.
`static final ConfigKey<Color>`
`AXLABEL_COLOR`
Config key for axis label colour.
`static final ConfigKey<BarStyle.Form>`
`BAR_FORM`
Config key for histogram bar style.
`static final CaptionerKeySet`
`CAPTIONER`
Config key set for axis and general captioner.
`static final ConfigKey<Color>`
`COLOR`
Config key for style colour.
`static final ConfigKey<Cumulation>`
`CUMULATIVE`
Config key for cumulative histogram mode.
`static final ConfigKey<float[]>`
`DASH`
Config key for line dash style.
`static final RampKeySet`
`DENSITY_RAMP`
Config key set for density point shading.
`static final MultiPointConfigKey`
`ELLIPSE_SHAPE`
Config key for ellipse marker style.
`static final MultiPointConfigKey`
`ERROR_SHAPE_1D`
Config key for 1d (vertical) error marker style.
`static final MultiPointConfigKey`
`ERROR_SHAPE_2D`
Config key for 2d error marker style.
`static final MultiPointConfigKey`
`ERROR_SHAPE_3D`
Config key for 3d error marker style.
`static final ConfigKey<FillMode>`
`FILL`
Config key for KDE fill mode.
`static final ConfigKey<Boolean>`
`GRID_ANTIALIAS`
Config key for axis grid antialiasing.
`static final ConfigKey<Color>`
`GRID_COLOR`
Config key for axis grid colour.
`static final ConfigKey<Double>`
`GRID_TRANSPARENCY`
Config key for axis grid transparency.
`static final KeySet<Color>`
`GRIDCOLOR_KEYSET`
Config keyset for axis grid colour, including transparency.
`static final ConfigKey<String>`
`LABEL`
Config key for a layer label string.
`static final ConfigKey<LevelMode>`
`LEVEL_MODE`
Config key for scaling level mode.
`static final ConfigKey<MarkerShape>`
`MARKER_SHAPE`
Config key for marker shape.
`static final ConfigKey<Boolean>`
`MINOR_TICKS`
Config key for minor tick drawing.
`static final ConfigKey<Normalisation>`
`NORMALISE`
Config key for histogram normalisation mode on generic axis.
`static final ConfigKey<Double>`
`SCALE`
Config key for scaling of markers in data space.
`static final ConfigKey<Double>`
`SCALE_PIX`
Config key for scaling of markers in pixel space.
`static final ConfigKey<Double>`
`SHADE_HIGH`
Config key for global aux shader upper limit.
`static final ConfigKey<Double>`
`SHADE_LOW`
Config key for global aux shader lower limit.
`static final ConfigKey<Subrange>`
`SHADE_SUBRANGE`
Config key for global aux shader subrange.
`static final ConfigKey<Boolean>`
`SHADOW_TICKS`
Config key for shadow tick drawing.
`static final ConfigKey<Boolean>`
`SHOW_LABEL`
Config key for legend inclusion flag.
`static final ConfigKey<Boolean>`
`SIDEWAYS`
Config key for drawing histogram-like plots sideways.
`static final ConfigKey<Integer>`
`SIZE`
Config key for marker size.
`static final ConfigKey<Double>`
`TRANSPARENCY`
Config key for "normal" transparency - it's just 1-alpha.
`static final ConfigKey<Double>`
`TRANSPARENT_LEVEL`
Config key for transparency level of adaptive transparent plots.
`static final MultiPointConfigKey`
`VECTOR_SHAPE`
Config key for vector marker style.
`static final ConfigKey<BasicXYShape>`
`XYSHAPE`
Config key for XY shape.
`static final ConfigKey<Double>`
`ZOOM_FACTOR`
Config key for zoom factor.

## Method Summary

Modifier and Type
Method
Description
`static ClippedShader[]`
`createAuxShaders()`
Returns a list of shaders suitable for aux axis shading.
`static ConfigKey<String>`
`createAxisLabelKey(String axName)`
Returns an axis labelling config key.
`static ConfigKey<Double>`
`createCrowdKey(ConfigMeta meta)`
Returns an axis tick mark crowding config key.
`static ConfigKey<MarkerShape>`
`createMarkerShapeKey(ConfigMeta meta, MarkerShape dflt)`
Returns a config key for choosing marker shape.
`static ConfigKey<Integer>`
`createMarkSizeKey(ConfigMeta meta, int dflt)`
Returns a config key for choosing marker size in pixels.
`static ConfigKey<Color>`
`createNullColorKey(String axname, String axName)`
Returns a key for acquiring a colour used in place of a shading ramp colour in case that the input data is null.
`static ConfigKey<Double>`
`createOpaqueKey(int dfltValue)`
Returns a key for acquiring an opacity value; the value is the number of pixels that have to be overplotted on a given position to completely obscure the background.
`static ConfigKey<Integer>`
`createPaintThicknessKey(ConfigMeta meta, int max)`
Returns a config key for painting stroke thickness.
`static Stroke`
`createStroke(ConfigMap config, int cap, int join)`
Obtains a line drawing stroke based on a config map.
`static ConfigKey<Integer>`
`createThicknessKey(int dfltThick)`
Returns a config key for line thickness with a given default value.
`static Color`
`getAlphaColor(ConfigMap config, ConfigKey<Color> colorKey, ConfigKey<Double> transparencyKey)`
Returns a colour specified by a basic colour key and a transparency key.
`static ConfigKey<?>[]`
`getStrokeKeys()`
Returns a list of config keys for configuring a line-drawing stroke.

### Methods inherited from class Object

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

## Field Details

### MARKER_SHAPE

public static final ConfigKey<MarkerShape> MARKER_SHAPE
Config key for marker shape.

### SIZE

public static final ConfigKey<Integer> SIZE
Config key for marker size.

### XYSHAPE

public static final ConfigKey<BasicXYShape> XYSHAPE
Config key for XY shape.

### COLOR

public static final ConfigKey<Color> COLOR
Config key for style colour.

### SIDEWAYS

public static final ConfigKey<Boolean> SIDEWAYS
Config key for drawing histogram-like plots sideways.

### AUX_OPAQUE

public static final ConfigKey<Double> AUX_OPAQUE
Config key for the opacity limit of global auxiliary shaded plots.

### TRANSPARENT_LEVEL

public static final ConfigKey<Double> TRANSPARENT_LEVEL
Config key for transparency level of adaptive transparent plots.

### TRANSPARENCY

public static final ConfigKey<Double> TRANSPARENCY
Config key for "normal" transparency - it's just 1-alpha.

### DASH

public static final ConfigKey<float[]> DASH
Config key for line dash style.

### GRID_COLOR

public static final ConfigKey<Color> GRID_COLOR
Config key for axis grid colour.

### GRIDCOLOR_KEYSET

public static final KeySet<Color> GRIDCOLOR_KEYSET
Config keyset for axis grid colour, including transparency.

### GRID_TRANSPARENCY

public static final ConfigKey<Double> GRID_TRANSPARENCY
Config key for axis grid transparency.

### AXLABEL_COLOR

public static final ConfigKey<Color> AXLABEL_COLOR
Config key for axis label colour.

### BAR_FORM

public static final ConfigKey<BarStyle.Form> BAR_FORM
Config key for histogram bar style.

### FILL

public static final ConfigKey<FillMode> FILL
Config key for KDE fill mode.

### CUMULATIVE

public static final ConfigKey<Cumulation> CUMULATIVE
Config key for cumulative histogram mode.

### NORMALISE

public static final ConfigKey<Normalisation> NORMALISE
Config key for histogram normalisation mode on generic axis.

### ANTIALIAS

public static final ConfigKey<Boolean> ANTIALIAS
Config key for line antialiasing.

### GRID_ANTIALIAS

public static final ConfigKey<Boolean> GRID_ANTIALIAS
Config key for axis grid antialiasing.

### ANCHOR

public static final ConfigKey<Anchor> ANCHOR
Config key for text anchor positioning.

### LEVEL_MODE

public static final ConfigKey<LevelMode> LEVEL_MODE
Config key for scaling level mode.

### VECTOR_SHAPE

public static final MultiPointConfigKey VECTOR_SHAPE
Config key for vector marker style.

### ELLIPSE_SHAPE

public static final MultiPointConfigKey ELLIPSE_SHAPE
Config key for ellipse marker style.

### ERROR_SHAPE_1D

public static final MultiPointConfigKey ERROR_SHAPE_1D
Config key for 1d (vertical) error marker style.

### ERROR_SHAPE_2D

public static final MultiPointConfigKey ERROR_SHAPE_2D
Config key for 2d error marker style.

### ERROR_SHAPE_3D

public static final MultiPointConfigKey ERROR_SHAPE_3D
Config key for 3d error marker style.

### AUX_CROWD

public static final ConfigKey<Double> AUX_CROWD
Config key for global aux axis tick crowding.

### SHADE_LOW

public static final ConfigKey<Double> SHADE_LOW
Config key for global aux shader lower limit.

### SHADE_HIGH

public static final ConfigKey<Double> SHADE_HIGH
Config key for global aux shader upper limit.

### SHADE_SUBRANGE

public static final ConfigKey<Subrange> SHADE_SUBRANGE
Config key for global aux shader subrange.

### AUX_NULLCOLOR

public static final ConfigKey<Color> AUX_NULLCOLOR
Config key for global aux null colour.

### AUXLOCAL_NULLCOLOR

public static final ConfigKey<Color> AUXLOCAL_NULLCOLOR
Config key for non-global aux null colour.

### SCALE

public static final ConfigKey<Double> SCALE
Config key for scaling of markers in data space.

### SCALE_PIX

public static final ConfigKey<Double> SCALE_PIX
Config key for scaling of markers in pixel space.

### AUTOSCALE

public static final ConfigKey<Boolean> AUTOSCALE
Config key for autoscale flag for markers in data space.

### AUTOSCALE_PIX

public static final ConfigKey<Boolean> AUTOSCALE_PIX
Config key for autoscale flag for markers in pixel space.

### LABEL

public static final ConfigKey<String> LABEL
Config key for a layer label string.

### SHOW_LABEL

public static final ConfigKey<Boolean> SHOW_LABEL
Config key for legend inclusion flag.

### MINOR_TICKS

public static final ConfigKey<Boolean> MINOR_TICKS
Config key for minor tick drawing.

### SHADOW_TICKS

public static final ConfigKey<Boolean> SHADOW_TICKS
Config key for shadow tick drawing.

### ZOOM_FACTOR

public static final ConfigKey<Double> ZOOM_FACTOR
Config key for zoom factor.

### CAPTIONER

public static final CaptionerKeySet CAPTIONER
Config key set for axis and general captioner.

### AUX_RAMP

public static final RampKeySet AUX_RAMP
Config key set for global Aux axis colour ramp.

### AUXLOCAL_RAMP

public static final RampKeySet AUXLOCAL_RAMP
Config key set for non-global Aux axis colour ramp.

### DENSITY_RAMP

public static final RampKeySet DENSITY_RAMP
Config key set for density point shading.

## Method Details

### getStrokeKeys

public static ConfigKey<?>[] getStrokeKeys()
Returns a list of config keys for configuring a line-drawing stroke. Pass a map with values for these to the `createStroke` method.

Returns:
  stroke key list
See Also:
  - `createStroke(ConfigMap, int, int)`

### createStroke

public static Stroke createStroke(ConfigMap config, int cap, int join)
Obtains a line drawing stroke based on a config map. The keys used are those returned by `getStrokeKeys`. The line join and cap policy must be provided.

Parameters:
  `config` - config map
  `cap` - one of `BasicStroke`'s CAP_* constants
  `join` - one of `BasicStroke`'s JOIN_* constants
Returns:
  stroke

### createMarkerShapeKey

public static ConfigKey<MarkerShape> createMarkerShapeKey(ConfigMeta meta, MarkerShape dflt)
Returns a config key for choosing marker shape.

Parameters:
  `meta` - metadata
  `dflt` - default shape value
Returns:
  new key

### createMarkSizeKey

public static ConfigKey<Integer> createMarkSizeKey(ConfigMeta meta, int dflt)
Returns a config key for choosing marker size in pixels.

Parameters:
  `meta` - metadata
  `dflt` - default size value
Returns:
  new key

### createCrowdKey

public static ConfigKey<Double> createCrowdKey(ConfigMeta meta)
Returns an axis tick mark crowding config key.

Parameters:
  `meta` - metadata
Returns:
  new key

### createAxisLabelKey

public static ConfigKey<String> createAxisLabelKey(String axName)
Returns an axis labelling config key.

Parameters:
  `axName` - axis name
Returns:
  new key

### createNullColorKey

public static ConfigKey<Color> createNullColorKey(String axname, String axName)
Returns a key for acquiring a colour used in place of a shading ramp colour in case that the input data is null.

Parameters:
  `axname` - short form of axis name, used in text parameter names
  `axName` - long form of axis name, used in descriptions
Returns:
  new key

### createOpaqueKey

public static ConfigKey<Double> createOpaqueKey(int dfltValue)
Returns a key for acquiring an opacity value; the value is the number of pixels that have to be overplotted on a given position to completely obscure the background.

Parameters:
  `dfltValue` - default opacity; the lowest sensible value is 1 (no transparency)
Returns:
  new key

### createThicknessKey

public static ConfigKey<Integer> createThicknessKey(int dfltThick)
Returns a config key for line thickness with a given default value.

Parameters:
  `dfltThick` - default value for line width in pixels
Returns:
  new config key

### createPaintThicknessKey

public static ConfigKey<Integer> createPaintThicknessKey(ConfigMeta meta, int max)
Returns a config key for painting stroke thickness. Zero corresponds to one pixel wide.

Parameters:
  `meta` - metadata
  `max` - maximum value
Returns:
  config key

### getAlphaColor

public static Color getAlphaColor(ConfigMap config, ConfigKey<Color> colorKey, ConfigKey<Double> transparencyKey)
Returns a colour specified by a basic colour key and a transparency key.

Parameters:
  `config` - config map
  `colorKey` - key for colour, for instance `COLOR`
  `transparencyKey` - key for 1-alpha, for instance `TRANSPARENCY`

### createAuxShaders

public static ClippedShader[] createAuxShaders()
Returns a list of shaders suitable for aux axis shading.

Returns:
  shaders