public class ShapeSymbol extends MetSymbol
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTR_POINTS
Xml attr name for points
|
static java.lang.String |
ATTR_SHAPE
Xml attr name for shape
|
static java.lang.String |
ATTR_SHAPETYPE
Xml attr name for shape type (triangle, quad, line)
|
static java.lang.String |
TYPE_LINE
Shape type to create when using points - visadlinearray
|
static java.lang.String |
TYPE_QUAD
Shape type to create when using points - visadquadarray
|
static java.lang.String |
TYPE_TRIANGLE
Shape type to create when using points - visadtrianglearray
|
ATTR_PARAMID, canvas, propertiesDialog
ATTR_RECTTYPE, bounds, CIRCLE, FCIRCLE, FRECTANGLE, FROUNDRECT, RECTANGLE, ROUNDRECT, TYPE_CIRCLE, TYPE_RECT, TYPE_RRECT
ATTR_BGCOLOR, ATTR_CHILDREN, ATTR_CLASS, ATTR_COLOR, ATTR_FILL, ATTR_HEIGHT, ATTR_IMAGE, ATTR_LINEWIDTH, ATTR_PARENT, ATTR_PTS, ATTR_STRETCHY, ATTR_TEXT, ATTR_TYPE, ATTR_WIDTH, baseline, H_SEL_WIDTH, highlightColor, idToGlyph, MIN_DISTANCE_TO_STRETCH, PT_CENTER, PT_H_LEFT, PT_H_MIDDLE, PT_H_RIGHT, PT_LL, PT_LM, PT_LR, PT_ML, PT_MM, PT_MR, PT_P1, PT_P2, PT_PREFIX, PT_UL, PT_UM, PT_UR, PT_V_LOWER, PT_V_MIDDLE, PT_V_UPPER, RECTPOINTNAMES, RECTPOINTS, SEL_WIDTH, TAG_GLYPH, underline, url
Constructor and Description |
---|
ShapeSymbol()
Default constructor.
|
ShapeSymbol(DisplayCanvas canvas,
int x,
int y)
Construct a ShapeSymbol to use on the canvas specified at the
position specified.
|
ShapeSymbol(int x,
int y)
Construct a ShapeSymbol without a canvas at the
position specified.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyProperties()
Apply properties from the properties dialog.
|
boolean |
doAllObs()
Should this symbol do all of the observations.
|
void |
draw(java.awt.Graphics2D g,
int x,
int y,
int width,
int height)
draw the symbol at the specified location
|
boolean |
getEqualSides()
Get whether this
MetSymbol has equals sides
(width and height). |
java.lang.String |
getLabel()
Get the label to show the user what I am in the properties
|
java.lang.Object |
getParamValue(int index)
Get the parameter value at the index specified.
|
float[] |
getPoints()
Get the points.
|
java.lang.String |
getShape()
Get the Shape property.
|
java.lang.String |
getShapeType()
Get the shape type.
|
boolean |
getStretchy()
Get whether this
MetSymbol can be stretched or not. |
void |
initialize(org.w3c.dom.Element symbolNode)
Initialize the shape with the xml
|
protected void |
initPropertyComponents(java.util.List comps)
Add any components to the list of widgets for the main property dialog
tab.
|
protected void |
makeShapePropertyComponents(java.util.List comps)
Add to the property components.
|
visad.VisADGeometryArray[] |
makeShapes(PointOb ob)
Make the shapes.
|
void |
setParamValue(int index,
java.lang.Object v)
Set the parameter value at the index specified.
|
void |
setPoints(float[] p)
Set the points.
|
void |
setShape(java.lang.String value)
Set the Shape property.
|
void |
setShapeType(java.lang.String type)
Set the shape type
|
void |
setStretchy(boolean s)
Is this stretchy
|
addPropertyTabs, clone, cloneMe, closePropertiesDialog, decrSize, doAlignmentMenu, draw, getActive, getBounds, getColorMappings, getColorParam, getColorTable, getColorTableParam, getColorTableRange, getColorTableUnit, getColorTableUnitName, getDesc, getDisplayUnit, getDisplayUnitName, getMissing, getName, getParam, getParamDescs, getParamIds, getRectPoint, getRotateInfo, getRotateXInfo, getRotateYInfo, getRotateZInfo, getScale, getScaleDataRange, getScaleParam, getScaleRange, getScaleUnit, getScaleUnitName, getXOffset, getYOffset, incrSize, makeShapes, paint, paintSelection, rotateOnEarth, setActive, setAttr, setColorMappings, setColorParam, setColorTable, setColorTableParam, setColorTableRange, setColorTableUnitName, setDisplayUnitName, setMissing, setOffset, setParamDescs, setParamIds, setRectPoint, setRotateDataRange, setRotateParam, setRotateRange, setRotateUnitName, setRotateXInfo, setRotateYInfo, setRotateZInfo, setScale, setScaleDataRange, setScaleParam, setScaleRange, setScaleUnitName, setTheDisplayUnit, shouldBeColored, shouldOffsetShape, shouldScaleShape, shouldShowColorTableGui, shouldShowRotateGui, shouldShowScaleGui, showDisplayUnitInProperties, showPropertiesDialog, toString
distance, getBottom, getBounds, getLeft, getPoint, getPositionAttr, getStretchPoint, getSymetricReshape, getTop, moveBy, moveTo, setPoints, setSize, setType, stretchTo
boundsChanged, canStretch, distance, doRemove, flipY, getAttrs, getBackground, getBackground, getBeingCreated, getCreateCommand, getCursor, getFilled, getForeground, getId, getLineWidth, getMoveCommand, getPersistent, getPointOnRect, getPointOnRect, getRectPointName, getRepaintBounds, getStretchPoint, getXml, initDone, makeAttr, notifyChange, paintHighlight, paintSelectionPoints, pickable, processAttrs, setBackground, setBeingCreated, setFilled, setForeground, setId, setLineWidth, setParent, stretchTo, stretchTo, toRect, transformOutput, transformOutput, transformOutputX, transformOutputY
public static final java.lang.String ATTR_POINTS
public static final java.lang.String ATTR_SHAPE
public static final java.lang.String ATTR_SHAPETYPE
public static final java.lang.String TYPE_LINE
public static final java.lang.String TYPE_TRIANGLE
public static final java.lang.String TYPE_QUAD
public ShapeSymbol()
public ShapeSymbol(int x, int y)
x
- x positiony
- y positionpublic ShapeSymbol(DisplayCanvas canvas, int x, int y)
canvas
- canvas to draw on.x
- x position on the canvasy
- y position on the canvaspublic java.lang.String getLabel()
public void initialize(org.w3c.dom.Element symbolNode)
initialize
in class MetSymbol
symbolNode
- The xmlprotected void initPropertyComponents(java.util.List comps)
initPropertyComponents
in class MetSymbol
comps
- List of components.protected void makeShapePropertyComponents(java.util.List comps)
comps
- List of label/component pairs.protected void applyProperties()
applyProperties
in class MetSymbol
public boolean getStretchy()
MetSymbol
can be stretched or not.getStretchy
in class Glyph
public void setStretchy(boolean s)
setStretchy
in class Glyph
s
- Is this stretchypublic java.lang.Object getParamValue(int index)
getParamValue
in class MetSymbol
index
- index into param arraypublic void setParamValue(int index, java.lang.Object v)
setParamValue
in class MetSymbol
index
- index into param arrayv
- value (String
) of double parameter valuepublic boolean getEqualSides()
MetSymbol
has equals sides
(width and height).getEqualSides
in class RectangleGlyph
public void draw(java.awt.Graphics2D g, int x, int y, int width, int height)
public void setShape(java.lang.String value)
value
- The new value for Shapepublic java.lang.String getShape()
public boolean doAllObs()
public visad.VisADGeometryArray[] makeShapes(PointOb ob)
makeShapes
in class MetSymbol
ob
- The observation. We don't use this.public java.lang.String getShapeType()
public void setShapeType(java.lang.String type)
type
- The shape typepublic float[] getPoints()
public void setPoints(float[] p)
p
- The points.