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 global aux axis tick crowding.Config key for global aux null colour.Config key for the opacity limit of global auxiliary shaded plots.static final RampKeySetConfig key set for global Aux axis colour ramp.Config key for non-global aux null colour.static final RampKeySetConfig key set for non-global Aux axis colour ramp.Config key for axis label colour.static final ConfigKey<BarStyle.Form> Config key for histogram bar style.static final CaptionerKeySetConfig 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 RampKeySetConfig key set for density point shading.static final MultiPointConfigKeyConfig key for ellipse marker style.static final MultiPointConfigKeyConfig key for 1d (vertical) error marker style.static final MultiPointConfigKeyConfig key for 2d error marker style.static final MultiPointConfigKeyConfig 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 global aux shader upper limit.Config key for global aux shader lower limit.Config key for global aux shader subrange.Config key for shadow tick drawing.Config key for legend inclusion flag.Config key for drawing histogram-like plots sideways.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 MultiPointConfigKeyConfig 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 StrokecreateStroke(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 ColorReturns 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
-
XYSHAPE
Config key for XY shape. -
COLOR
-
SIDEWAYS
-
AUX_OPAQUE
-
TRANSPARENT_LEVEL
-
TRANSPARENCY
-
DASH
Config key for line dash style. -
GRID_COLOR
-
GRIDCOLOR_KEYSET
-
GRID_TRANSPARENCY
-
AXLABEL_COLOR
-
BAR_FORM
Config key for histogram bar style. -
FILL
-
CUMULATIVE
Config key for cumulative histogram mode. -
NORMALISE
Config key for histogram normalisation mode on generic axis. -
ANTIALIAS
-
GRID_ANTIALIAS
-
ANCHOR
-
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
-
SHADE_LOW
-
SHADE_HIGH
-
SHADE_SUBRANGE
-
AUX_NULLCOLOR
-
AUXLOCAL_NULLCOLOR
-
SCALE
-
SCALE_PIX
-
AUTOSCALE
-
AUTOSCALE_PIX
-
LABEL
-
SHOW_LABEL
-
MINOR_TICKS
-
SHADOW_TICKS
-
ZOOM_FACTOR
-
CAPTIONER
Config key set for axis and general captioner. -
AUX_RAMP
Config key set for global Aux axis colour ramp. -
AUXLOCAL_RAMP
Config key set for non-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 thecreateStrokemethod.- 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
-
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
-
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 instanceCOLORtransparencyKey- key for 1-alpha, for instanceTRANSPARENCY
-
createAuxShaders
Returns a list of shaders suitable for aux axis shading.- Returns:
- shaders
-