|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.ui.drawing.Glyph
ucar.unidata.ui.drawing.RectangleGlyph
ucar.unidata.ui.symbol.MetSymbol
ucar.unidata.ui.symbol.ShapeSymbol
public class ShapeSymbol
Shape symbol.
| Field Summary | |
|---|---|
static String |
ATTR_POINTS
Xml attr name for points |
static String |
ATTR_SHAPE
Xml attr name for shape |
static String |
ATTR_SHAPETYPE
Xml attr name for shape type (triangle, quad, line) |
static String |
TYPE_LINE
Shape type to create when using points - visadlinearray |
static String |
TYPE_QUAD
Shape type to create when using points - visadquadarray |
static String |
TYPE_TRIANGLE
Shape type to create when using points - visadtrianglearray |
| Fields inherited from class ucar.unidata.ui.symbol.MetSymbol |
|---|
ATTR_PARAMID, canvas, propertiesDialog |
| Fields inherited from class ucar.unidata.ui.drawing.RectangleGlyph |
|---|
ATTR_RECTTYPE, bounds, CIRCLE, FCIRCLE, FRECTANGLE, FROUNDRECT, RECTANGLE, ROUNDRECT, TYPE_CIRCLE, TYPE_RECT, TYPE_RRECT |
| Fields inherited from class ucar.unidata.ui.drawing.Glyph |
|---|
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 Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
protected void |
applyProperties()
Apply properties from the properties dialog. |
boolean |
doAllObs()
Should this symbol do all of the observations. |
void |
draw(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). |
String |
getLabel()
Get the label to show the user what I am in the properties |
Object |
getParamValue(int index)
Get the parameter value at the index specified. |
float[] |
getPoints()
Get the points. |
String |
getShape()
Get the Shape property. |
String |
getShapeType()
Get the shape type. |
boolean |
getStretchy()
Get whether this MetSymbol can be stretched or not. |
void |
initialize(Element symbolNode)
Initialize the shape with the xml |
protected void |
initPropertyComponents(List comps)
Add any components to the list of widgets for the main property dialog tab. |
protected void |
makeShapePropertyComponents(List comps)
Add to the property components. |
VisADGeometryArray[] |
makeShapes(PointOb ob)
Make the shapes. |
void |
setParamValue(int index,
Object v)
Set the parameter value at the index specified. |
void |
setPoints(float[] p)
Set the points. |
void |
setShape(String value)
Set the Shape property. |
void |
setShapeType(String type)
Set the shape type |
void |
setStretchy(boolean s)
Is this stretchy |
| Methods inherited from class ucar.unidata.ui.drawing.RectangleGlyph |
|---|
distance, getBottom, getBounds, getLeft, getPoint, getPositionAttr, getStretchPoint, getSymetricReshape, getTop, moveBy, moveTo, setPoints, setSize, setType, stretchTo |
| Methods inherited from class ucar.unidata.ui.drawing.Glyph |
|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ATTR_POINTS
public static final String ATTR_SHAPE
public static final String ATTR_SHAPETYPE
public static final String TYPE_LINE
public static final String TYPE_TRIANGLE
public static final String TYPE_QUAD
| Constructor Detail |
|---|
public ShapeSymbol()
public ShapeSymbol(int x,
int y)
x - x positiony - y position
public ShapeSymbol(DisplayCanvas canvas,
int x,
int y)
canvas - canvas to draw on.x - x position on the canvasy - y position on the canvas| Method Detail |
|---|
public String getLabel()
getLabel in class MetSymbolpublic void initialize(Element symbolNode)
initialize in class MetSymbolsymbolNode - The xmlprotected void initPropertyComponents(List comps)
initPropertyComponents in class MetSymbolcomps - List of components.protected void makeShapePropertyComponents(List comps)
comps - List of label/component pairs.protected void applyProperties()
applyProperties in class MetSymbolpublic boolean getStretchy()
MetSymbol can be stretched or not.
getStretchy in class Glyphpublic void setStretchy(boolean s)
setStretchy in class Glyphs - Is this stretchypublic Object getParamValue(int index)
getParamValue in class MetSymbolindex - index into param array
public void setParamValue(int index,
Object v)
setParamValue in class MetSymbolindex - 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(Graphics2D g,
int x,
int y,
int width,
int height)
draw in class MetSymbolg - Graphics2D objectx - x position of the reference pointy - y position of the reference pointwidth - width of the symbolheight - height of the symbolpublic void setShape(String value)
value - The new value for Shapepublic String getShape()
public boolean doAllObs()
doAllObs in class MetSymbolpublic VisADGeometryArray[] makeShapes(PointOb ob)
makeShapes in class MetSymbolob - The observation. We don't use this.
public String getShapeType()
public void setShapeType(String type)
type - The shape typepublic float[] getPoints()
public void setPoints(float[] p)
p - The points.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||