public abstract class MultiPointForm extends Object implements ShapeForm
extra
coordinates.
The extra coordinates required (defining one or more non-central
data positions) are defined by a supplied MultiPointCoordSet
and those coordinates are then plotted by a corresponding
MultiPointShape
.Modifier and Type | Field and Description |
---|---|
static int |
AUTOSCALE_PIXELS
Size of longest/characteristic shape in pixels when autoscaled.
|
Constructor and Description |
---|
MultiPointForm(String name,
Icon icon,
String description,
MultiPointCoordSet extraCoordSet,
MultiPointConfigKey shapeKey,
ConfigKey<Double> scaleKey,
ConfigKey<?>[] otherKeys)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DataGeom |
adjustGeom(DataGeom geom,
DataSpec dataSpec,
ShapeStyle style)
Provides a DataGeom to be used by the layer this form makes,
given a DataGeom that characterises the plotting environment.
|
Outliner |
createOutliner(ConfigMap config)
Returns an object which will do the work of drawing shapes
when supplied with the appropriate style information and data.
|
protected abstract MultiPointReader |
createReader(ConfigMap config)
Returns an object that can read shapes for use by this form.
|
static ConfigKey<Integer> |
createThicknessKey(MultiPointConfigKey shapeKey)
Creates a config key for line thickness to be used with
MultiPointShapes.
|
int |
getBasicPositionCount()
Returns the number of basic data positions per tuple used by this form.
|
ConfigKey<?>[] |
getConfigKeys()
Returns style configuration keys specific to this form.
|
static String |
getDefaultScalingDescription(String shapename)
Returns XML text suitable for inclusion in a MultiPointForm description
explaining how the scaling of marker sizes is controlled.
|
Coord[] |
getExtraCoords()
Returns data coordinates additional to the basic position which
are required to plot a point.
|
int |
getExtraPositionCount()
Returns the number of extra coordinates that can be interpreted as
positions.
|
static int |
getExtrasCoordIndex(DataGeom geom)
Returns the column index in a tuple sequence at which the
extra (multi-point) coordinates start.
|
String |
getFormDescription()
Returns a description of this mode as an XML string.
|
Icon |
getFormIcon()
Returns an icon to identify this form in the GUI.
|
String |
getFormName()
Returns the user-directed name for this form.
|
public static final int AUTOSCALE_PIXELS
public MultiPointForm(String name, Icon icon, String description, MultiPointCoordSet extraCoordSet, MultiPointConfigKey shapeKey, ConfigKey<Double> scaleKey, ConfigKey<?>[] otherKeys)
name
- shapeform nameicon
- shapeform icondescription
- XML descriptionextraCoordSet
- defines the extra positional coordinates
used to plot multipoint shapesshapeKey
- config key for the shape; provides option to
vary the shape, but any shape specified by it
must be expecting data corresponding to the
extraCoordSet
parameterscaleKey
- config key for scaling graphical display,
or null if no scaling is availableotherKeys
- additional config keysprotected abstract MultiPointReader createReader(ConfigMap config)
config
- configuration optionspublic int getBasicPositionCount()
ShapeForm
getBasicPositionCount
in interface ShapeForm
public String getFormName()
ModePlotter.Form
getFormName
in interface ModePlotter.Form
public Icon getFormIcon()
ModePlotter.Form
getFormIcon
in interface ModePlotter.Form
public String getFormDescription()
ShapeForm
getFormDescription
in interface ShapeForm
public Coord[] getExtraCoords()
ShapeForm
getExtraCoords
in interface ShapeForm
public int getExtraPositionCount()
ShapeForm
getExtraPositionCount
in interface ShapeForm
public DataGeom adjustGeom(DataGeom geom, DataSpec dataSpec, ShapeStyle style)
ShapeForm
In most cases the supplied DataGeom instance can be returned unchanged, but instances with special requirements may want to adjust how the data is interpreted.
adjustGeom
in interface ShapeForm
geom
- context geomdataSpec
- data specification with which the geom will be usedstyle
- style with which the geom will be usedpublic ConfigKey<?>[] getConfigKeys()
ShapeForm
ShapeForm.createOutliner(uk.ac.starlink.ttools.plot2.config.ConfigMap)
.getConfigKeys
in interface ShapeForm
public Outliner createOutliner(ConfigMap config)
ShapeForm
ShapeForm.getConfigKeys()
.createOutliner
in interface ShapeForm
config
- configuration map from which values for this
form's config keys will be extractedpublic static String getDefaultScalingDescription(String shapename)
shapename
- human-readable name of the shape being plotted
by this formpublic static ConfigKey<Integer> createThicknessKey(MultiPointConfigKey shapeKey)
shapeKey
- configured shape to which this relatespublic static int getExtrasCoordIndex(DataGeom geom)
geom
- data position geometryCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.