Class SkyMultiPointForm
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.layer.MultiPointForm
-
- uk.ac.starlink.ttools.plot2.layer.SkyMultiPointForm
-
- All Implemented Interfaces:
ModePlotter.Form
,ShapeForm
public class SkyMultiPointForm extends MultiPointForm
MultiPointForm with scaling options that make sense for plotting markers on the sky with potentially absolute angular extents.- Since:
- 2 Aug 2017
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description SkyMultiPointForm(java.lang.String name, javax.swing.Icon icon, java.lang.String description, MultiPointCoordSet extraCoordSet, MultiPointConfigKey rendererKey)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getCoordUnitText()
Returns a sentence of XML text describing the units of a scaled coordinate are specified.protected double
getScaleFactor(ConfigMap config)
Returns a fixed constant by which to scale all (autoscaled or not autoscaled) offset values before plotting.static java.lang.String
getScalingDescription(FloatingCoord[] scaledCoords, java.lang.String shapename)
Returns XML text suitable for inclusion in a MultiPointForm description explaining how the scaling of marker sizes is controlled.protected boolean
isAutoscale(ConfigMap config)
Indicates whether autoscaling should be applied.-
Methods inherited from class uk.ac.starlink.ttools.plot2.layer.MultiPointForm
adjustGeom, createDefaultForm, createErrorForm, createOutliner, createThicknessKey, createVectorForm, getConfigKeys, getDefaultScalingDescription, getExtraCoords, getFormDescription, getFormIcon, getFormName, getPositionCount
-
-
-
-
Constructor Detail
-
SkyMultiPointForm
public SkyMultiPointForm(java.lang.String name, javax.swing.Icon icon, java.lang.String description, MultiPointCoordSet extraCoordSet, MultiPointConfigKey rendererKey)
Constructor.- Parameters:
name
- shapeform nameicon
- shapeform icondescription
- XML descriptionextraCoordSet
- defines the extra positional coordinates used to plot multipoint shapesrendererKey
- config key for the renderer, defining the plotted shape; any renderer specified must be expecting data corresponding to the extraCoordSet parameter
-
-
Method Detail
-
getScaleFactor
protected double getScaleFactor(ConfigMap config)
Description copied from class:MultiPointForm
Returns a fixed constant by which to scale all (autoscaled or not autoscaled) offset values before plotting.- Specified by:
getScaleFactor
in classMultiPointForm
- Parameters:
config
- config map- Returns:
- constant scaling factor
-
isAutoscale
protected boolean isAutoscale(ConfigMap config)
Description copied from class:MultiPointForm
Indicates whether autoscaling should be applied. If true, before plotting is carried out a scan of all the data values is performed to determine the range of values, and the supplied offsets are scaled accordingly, so that the largest ones are a reasonable size on the screen.- Specified by:
isAutoscale
in classMultiPointForm
- Parameters:
config
- config map- Returns:
- true for autoscaling false to use raw values
-
getCoordUnitText
public static java.lang.String getCoordUnitText()
Returns a sentence of XML text describing the units of a scaled coordinate are specified. This is suitable for inclusion in the description of the relevant FloatingCoord.- Returns:
- description text
-
getScalingDescription
public static java.lang.String getScalingDescription(FloatingCoord[] scaledCoords, java.lang.String shapename)
Returns XML text suitable for inclusion in a MultiPointForm description explaining how the scaling of marker sizes is controlled.- Parameters:
scaledCoords
- coordinates that will be scaled by the scale and unit config optionsshapename
- human-readable name of the shape being plotted by this form- Returns:
- description text <p> element
-
-