|
||||||||||
| 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.WindBarbSymbol
public class WindBarbSymbol
Wind Barb meteorological symbol.
| Nested Class Summary | |
|---|---|
static class |
WindBarbSymbol.WindDrawer
Class WindDrawer knows how to draw windbarbs |
| Field Summary | |
|---|---|
static double |
DEG_TO_RAD
Fix conversion value |
| 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 | |
|---|---|
WindBarbSymbol()
Default constructor. |
|
WindBarbSymbol(DisplayCanvas canvas,
int x,
int y)
Construct a WindBarbSymbol to use on the canvas specified at the position specified. |
|
WindBarbSymbol(DisplayCanvas canvas,
int x,
int y,
String uOrSpeedParam,
String uOrSpeedDescr,
String vOrDirParam,
String vOrDirDescr)
Construct a WindBarbSymbol to use on the canvas specified at the position specified. |
|
WindBarbSymbol(int x,
int y,
String uOrSpeedParam,
String uOrSpeedDescr,
String vOrDirParam,
String vOrDirDescr)
Construct a WindBarbSymbol without a canvas at the position specified. |
|
| Method Summary | |
|---|---|
boolean |
doAlignmentMenu()
Determine whether this MetSymbol should show an
alignment menu in an editor. |
void |
draw(Graphics2D g,
int x,
int y,
int width,
int height)
draw the symbol at the specified location |
String |
getDirectionName()
Get the name of the Direction or V component. |
boolean |
getEqualSides()
Get whether this MetSymbol has equals sides
(width and height). |
Object |
getParamValue(int index)
Get the parameter value at the index specified. |
String |
getSpeedName()
Get the name of the Speed or U component. |
boolean |
getStretchy()
Get whether this MetSymbol can be stretched or not. |
boolean |
getSymetricReshape()
Get whether this MetSymbol should be stretched
symetrically or not. |
double |
getWindDirection()
get the Wind Direction, in degrees (0 = north) from [0, 360) |
double |
getWindSpeed()
get the Wind Speed, in knots |
protected WindBarbSymbol.WindDrawer |
makeDrawer()
Make the drawer for this symbol |
boolean |
rotateOnEarth()
Can we rotate this symbol when the display rotates |
void |
setParamValue(int index,
Object v)
Set the parameter value at the index specified. |
void |
setWindDirection(double windDirection)
set the Wind Direction, in degrees (0 = north) from [0, 360) |
void |
setWindSpeed(double windSpeed)
set the Wind Speed, in knots |
boolean |
shouldOffsetShape()
Should this shape be offset. |
boolean |
shouldScaleShape()
Should this shape be scaled. |
| Methods inherited from class ucar.unidata.ui.drawing.RectangleGlyph |
|---|
distance, getBottom, getBounds, getLeft, getPoint, getPositionAttr, getStretchPoint, 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, setStretchy, 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 double DEG_TO_RAD
| Constructor Detail |
|---|
public WindBarbSymbol()
public WindBarbSymbol(DisplayCanvas canvas,
int x,
int y)
canvas - canvas to draw on.x - x position on the canvasy - y position on the canvas
public WindBarbSymbol(int x,
int y,
String uOrSpeedParam,
String uOrSpeedDescr,
String vOrDirParam,
String vOrDirDescr)
x - x positiony - y positionuOrSpeedParam - u or speed component of wind parameter nameuOrSpeedDescr - u or speed component of wind parameter descriptionvOrDirParam - v or direction component of wind parameter namevOrDirDescr - v or direction component of wind parameter descr
public WindBarbSymbol(DisplayCanvas canvas,
int x,
int y,
String uOrSpeedParam,
String uOrSpeedDescr,
String vOrDirParam,
String vOrDirDescr)
canvas - canvas to draw on.x - x position on the canvasy - y position on the canvasuOrSpeedParam - u or speed component of wind parameter nameuOrSpeedDescr - u or speed component of wind parameter descriptionvOrDirParam - v or direction component of wind parameter namevOrDirDescr - v or direction component of wind parameter descr| Method Detail |
|---|
public boolean shouldScaleShape()
shouldScaleShape in class MetSymbolpublic boolean shouldOffsetShape()
shouldOffsetShape in class MetSymbolpublic boolean doAlignmentMenu()
MetSymbol should show an
alignment menu in an editor. Subclasses should override if not.
doAlignmentMenu in class MetSymbolpublic 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 String getSpeedName()
public String getDirectionName()
public boolean getStretchy()
MetSymbol can be stretched or not.
getStretchy in class Glyphpublic boolean getEqualSides()
MetSymbol has equals sides
(width and height).
getEqualSides in class RectangleGlyphpublic boolean getSymetricReshape()
MetSymbol should be stretched
symetrically or not.
getSymetricReshape in class RectangleGlyphpublic double getWindSpeed()
public void setWindSpeed(double windSpeed)
windSpeed - speed in knotspublic double getWindDirection()
public void setWindDirection(double windDirection)
windDirection -
public void draw(Graphics2D g,
int x,
int y,
int width,
int height)
draw in class MetSymbolg - Graphics to draw tox - x locationy - y locationwidth - width to drawheight - height to drawprotected WindBarbSymbol.WindDrawer makeDrawer()
public boolean rotateOnEarth()
rotateOnEarth in class MetSymbol
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||