public abstract class MultiPointShape extends Object
This code is a reworked version of the class
ErrorRenderer
,
originally intended for drawing error bars,
but the usage is more general than that.
Modifier and Type | Field and Description |
---|---|
static MultiPointShape |
DEFAULT
General purpose multi-point shape.
|
static MultiPointShape |
EXAMPLE
Shape suitable for use in user controls.
|
static MultiPointShape |
NONE
Multi-point shape which draws nothing.
|
Modifier | Constructor and Description |
---|---|
protected |
MultiPointShape(String name,
int iconDim,
boolean canThick)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canThick()
Indicates whether variants of this shape with different line
thicknesses are available.
|
abstract MultiPointScribe |
createScribe(int nthick)
Returns an object that can turn offset arrays into painted shapes
with configurable line thickness.
|
Icon |
getLegendIcon()
Returns an icon giving a general example of what this shape looks like.
|
Icon |
getLegendIcon(MultiPointScribe scribe,
ErrorMode[] modes,
int width,
int height,
int xpad,
int ypad)
Returns an icon giving an example of what this shape looks like in a
detailed context.
|
String |
getName()
Returns a user-readable name for this shape.
|
static MultiPointShape[] |
getOptionsEllipse()
Returns an array of instances which is suitable for 2d
ellipse-like applications.
|
static MultiPointShape[] |
getOptionsError1d()
Returns an array of instances which can render 1-dimensional
(vertical) errors.
|
static MultiPointShape[] |
getOptionsError2d()
Returns an array of instances which can render 2-dimensional errors.
|
static MultiPointShape[] |
getOptionsError3d()
Returns an array of instances which can render 3-dimensional errors.
|
static MultiPointShape[] |
getOptionsVector()
Returns an array of instances which is suitable for
vector-like applications.
|
abstract boolean |
supportsDimensionality(int ndim)
Reports whether this shape can be used in a given dimensionality.
|
String |
toString() |
public static final MultiPointShape NONE
public static final MultiPointShape DEFAULT
public static final MultiPointShape EXAMPLE
protected MultiPointShape(String name, int iconDim, boolean canThick)
name
- user-directed shape nameiconDim
- dimensionality to use for basic icon generationcanThick
- true iff this shape is available in different
line thicknessespublic Icon getLegendIcon()
public Icon getLegendIcon(MultiPointScribe scribe, ErrorMode[] modes, int width, int height, int xpad, int ypad)
scribe
- shape paintermodes
- array of ErrorModes, one per error dimension (x, y, ...)width
- total width of iconheight
- total height of iconxpad
- internal horizontal padding of iconypad
- internal vertical padding of iconpublic abstract boolean supportsDimensionality(int ndim)
ndim
- number of error dimensions to be usedpublic abstract MultiPointScribe createScribe(int nthick)
canThick()
returns false, the parameter makes no difference.nthick
- non-negative line thickness, 0 is single-pixelpublic boolean canThick()
createScribe(int)
makes any differencepublic String getName()
public static MultiPointShape[] getOptionsError1d()
public static MultiPointShape[] getOptionsError2d()
public static MultiPointShape[] getOptionsError3d()
public static MultiPointShape[] getOptionsEllipse()
public static MultiPointShape[] getOptionsVector()
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.