Class SizeXyForm
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.layer.SizeXyForm
-
- All Implemented Interfaces:
ModePlotter.Form
,ShapeForm
public class SizeXyForm extends java.lang.Object implements ShapeForm
ShapeForm implementation that draws shaped markers with their horizontal and vertical dimensions independently determined by two additional data coordinates. Autoscaling of points based on data values to ensure sensible marker sizes is optionally available.Singleton class.
- Since:
- 14 Jan 2015
- Author:
- Mark Taylor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SizeXyForm.SizeXyOutliner
Outliner implementation for use with SizeXyForm.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Outliner
createOutliner(ConfigMap config)
Returns an object which will do the work of drawing shapes when supplied with the appropriate style information and data.ConfigKey[]
getConfigKeys()
Returns style configuration keys specific to this form.Coord[]
getExtraCoords()
Returns data coordinates additional to the basic position which are required to plot a point.java.lang.String
getFormDescription()
Returns a description of this mode as an XML string.javax.swing.Icon
getFormIcon()
Returns an icon to identify this form in the GUI.java.lang.String
getFormName()
Returns the user-directed name for this form.static SizeXyForm
getInstance()
Returns the sole instance of this class.int
getPositionCount()
Returns the number of data positions per tuple used by this form.
-
-
-
Method Detail
-
getPositionCount
public int getPositionCount()
Description copied from interface:ShapeForm
Returns the number of data positions per tuple used by this form.- Specified by:
getPositionCount
in interfaceShapeForm
- Returns:
- number of sets of positional coordinates
-
getFormName
public java.lang.String getFormName()
Description copied from interface:ModePlotter.Form
Returns the user-directed name for this form.- Specified by:
getFormName
in interfaceModePlotter.Form
- Returns:
- form name
-
getFormIcon
public javax.swing.Icon getFormIcon()
Description copied from interface:ModePlotter.Form
Returns an icon to identify this form in the GUI.- Specified by:
getFormIcon
in interfaceModePlotter.Form
- Returns:
- form icon
-
getFormDescription
public java.lang.String getFormDescription()
Description copied from interface:ShapeForm
Returns a description of this mode as an XML string. The return value should be one or more <p> elements.- Specified by:
getFormDescription
in interfaceShapeForm
- Returns:
- XML description of form
-
getExtraCoords
public Coord[] getExtraCoords()
Description copied from interface:ShapeForm
Returns data coordinates additional to the basic position which are required to plot a point.- Specified by:
getExtraCoords
in interfaceShapeForm
- Returns:
- additional plot coordinates
-
getConfigKeys
public ConfigKey[] getConfigKeys()
Description copied from interface:ShapeForm
Returns style configuration keys specific to this form. These keys will be used in the config map supplied toShapeForm.createOutliner(uk.ac.starlink.ttools.plot2.config.ConfigMap)
.- Specified by:
getConfigKeys
in interfaceShapeForm
- Returns:
- config keys
-
createOutliner
public Outliner createOutliner(ConfigMap config)
Description copied from interface:ShapeForm
Returns an object which will do the work of drawing shapes when supplied with the appropriate style information and data. The significant keys in the supplied config map are those given byShapeForm.getConfigKeys()
.- Specified by:
createOutliner
in interfaceShapeForm
- Parameters:
config
- configuration map from which values for this form's config keys will be extracted- Returns:
- new outliner object
-
getInstance
public static SizeXyForm getInstance()
Returns the sole instance of this class.- Returns:
- singleton instance
-
-