Class StyleKeys
java.lang.Object
uk.ac.starlink.ttools.plot2.config.StyleKeys
Contains many common config keys and associated utility methods.
- Since:
- 25 Feb 2013
- Author:
- Mark Taylor
-
Field Summary
FieldsModifier and TypeFieldDescriptionConfig key for text anchor positioning.Config key for line antialiasing.Config key for autoscale flag for markers in data space.Config key for autoscale flag for markers in pixel space.Config key for aux axis tick crowding.Config key for aux null colour.Config key for the opacity limit of auxiliary shaded plots.static final RampKeySet
Config key set for global Aux axis colour ramp.Config key for axis label colour.static final ConfigKey
<BarStyle.Form> Config key for histogram bar style.static final CaptionerKeySet
Config key set for axis and general captioner.Config key for style colour.static final ConfigKey
<Cumulation> Config key for cumulative histogram mode.static final ConfigKey
<float[]> Config key for line dash style.static final RampKeySet
Config key set for density point shading.static final MultiPointConfigKey
Config key for ellipse marker style.static final MultiPointConfigKey
Config key for 1d (vertical) error marker style.static final MultiPointConfigKey
Config key for 2d error marker style.static final MultiPointConfigKey
Config key for 3d error marker style.Config key for KDE fill mode.Config key for axis grid antialiasing.Config key for axis grid colour.Config key for axis grid transparency.Config keyset for axis grid colour, including transparency.Config key for a layer label string.Config key for scaling level mode.static final ConfigKey
<MarkerShape> Config key for marker shape.Config key for minor tick drawing.static final ConfigKey
<Normalisation> Config key for histogram normalisation mode on generic axis.Config key for scaling of markers in data space.Config key for scaling of markers in pixel space.Config key for aux shader upper limit.Config key for aux shader lower limit.Config key for aux shader subrange.Config key for shadow tick drawing.Config key for legend inclusion flag.Config key for marker size.Config key for "normal" transparency - it's just 1-alpha.Config key for transparency level of adaptive transparent plots.static final MultiPointConfigKey
Config key for vector marker style.static final ConfigKey
<BasicXYShape> Config key for XY shape.Config key for zoom factor. -
Method Summary
Modifier and TypeMethodDescriptionstatic ClippedShader[]
Returns a list of shaders suitable for aux axis shading.createAxisLabelKey
(String axName) Returns an axis labelling config key.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.createMarkSizeKey
(ConfigMeta meta, int dflt) Returns a config key for choosing marker size in pixels.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.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.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.createThicknessKey
(int dfltThick) Returns a config key for line thickness with a given default value.static Color
Returns a colour specified by a basic colour key and a transparency key.static ConfigKey<?>[]
Returns a list of config keys for configuring a line-drawing stroke.
-
Field Details
-
MARKER_SHAPE
Config key for marker shape. -
SIZE
Config key for marker size. -
XYSHAPE
Config key for XY shape. -
COLOR
Config key for style colour. -
AUX_OPAQUE
Config key for the opacity limit of auxiliary shaded plots. -
TRANSPARENT_LEVEL
Config key for transparency level of adaptive transparent plots. -
TRANSPARENCY
Config key for "normal" transparency - it's just 1-alpha. -
DASH
Config key for line dash style. -
GRID_COLOR
Config key for axis grid colour. -
GRIDCOLOR_KEYSET
Config keyset for axis grid colour, including transparency. -
GRID_TRANSPARENCY
Config key for axis grid transparency. -
AXLABEL_COLOR
Config key for axis label colour. -
BAR_FORM
Config key for histogram bar style. -
FILL
Config key for KDE fill mode. -
CUMULATIVE
Config key for cumulative histogram mode. -
NORMALISE
Config key for histogram normalisation mode on generic axis. -
ANTIALIAS
Config key for line antialiasing. -
GRID_ANTIALIAS
Config key for axis grid antialiasing. -
ANCHOR
Config key for text anchor positioning. -
LEVEL_MODE
Config key for scaling level mode. -
VECTOR_SHAPE
Config key for vector marker style. -
ELLIPSE_SHAPE
Config key for ellipse marker style. -
ERROR_SHAPE_1D
Config key for 1d (vertical) error marker style. -
ERROR_SHAPE_2D
Config key for 2d error marker style. -
ERROR_SHAPE_3D
Config key for 3d error marker style. -
AUX_CROWD
Config key for aux axis tick crowding. -
SHADE_LOW
Config key for aux shader lower limit. -
SHADE_HIGH
Config key for aux shader upper limit. -
SHADE_SUBRANGE
Config key for aux shader subrange. -
AUX_NULLCOLOR
Config key for aux null colour. -
SCALE
Config key for scaling of markers in data space. -
SCALE_PIX
Config key for scaling of markers in pixel space. -
AUTOSCALE
Config key for autoscale flag for markers in data space. -
AUTOSCALE_PIX
Config key for autoscale flag for markers in pixel space. -
LABEL
Config key for a layer label string. -
SHOW_LABEL
Config key for legend inclusion flag. -
MINOR_TICKS
Config key for minor tick drawing. -
SHADOW_TICKS
Config key for shadow tick drawing. -
ZOOM_FACTOR
Config key for zoom factor. -
CAPTIONER
Config key set for axis and general captioner. -
AUX_RAMP
Config key set for global Aux axis colour ramp. -
DENSITY_RAMP
Config key set for density point shading.
-
-
Method Details
-
getStrokeKeys
Returns a list of config keys for configuring a line-drawing stroke. Pass a map with values for these to thecreateStroke
method.- Returns:
- stroke key list
- See Also:
-
createStroke
Obtains a line drawing stroke based on a config map. The keys used are those returned bygetStrokeKeys
. The line join and cap policy must be provided.- Parameters:
config
- config mapcap
- one ofBasicStroke
's CAP_* constantsjoin
- one ofBasicStroke
's JOIN_* constants- Returns:
- stroke
-
createMarkerShapeKey
Returns a config key for choosing marker shape.- Parameters:
meta
- metadatadflt
- default shape value- Returns:
- new key
-
createMarkSizeKey
Returns a config key for choosing marker size in pixels.- Parameters:
meta
- metadatadflt
- default size value- Returns:
- new key
-
createCrowdKey
Returns an axis tick mark crowding config key.- Parameters:
meta
- metadata- Returns:
- new key
-
createAxisLabelKey
Returns an axis labelling config key.- Parameters:
axName
- axis name- Returns:
- new key
-
createNullColorKey
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 namesaxName
- long form of axis name, used in descriptions- Returns:
- new key
-
createOpaqueKey
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
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
Returns a config key for painting stroke thickness. Zero corresponds to one pixel wide.- Parameters:
meta
- metadatamax
- 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 mapcolorKey
- key for colour, for instanceCOLOR
transparencyKey
- key for 1-alpha, for instanceTRANSPARENCY
-
createAuxShaders
Returns a list of shaders suitable for aux axis shading.- Returns:
- shaders
-