public class WindBarbSymbol extends MetSymbol
Modifier and Type | Class and Description |
---|---|
static class |
WindBarbSymbol.WindDrawer
Class WindDrawer knows how to draw windbarbs
|
Modifier and Type | Field and Description |
---|---|
static double |
DEG_TO_RAD
Fix conversion value
|
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 |
---|
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,
java.lang.String uOrSpeedParam,
java.lang.String uOrSpeedDescr,
java.lang.String vOrDirParam,
java.lang.String vOrDirDescr)
Construct a WindBarbSymbol to use on the canvas specified at the
position specified.
|
WindBarbSymbol(int x,
int y,
java.lang.String uOrSpeedParam,
java.lang.String uOrSpeedDescr,
java.lang.String vOrDirParam,
java.lang.String vOrDirDescr)
Construct a WindBarbSymbol without a canvas at the
position specified.
|
Modifier and Type | Method and Description |
---|---|
boolean |
doAlignmentMenu()
Determine whether this
MetSymbol should show an
alignment menu in an editor. |
void |
draw(java.awt.Graphics2D g,
int x,
int y,
int width,
int height)
draw the symbol at the specified location
|
java.lang.String |
getDirectionName()
Get the name of the Direction or V component.
|
boolean |
getEqualSides()
Get whether this
MetSymbol has equals sides
(width and height). |
java.lang.Object |
getParamValue(int index)
Get the parameter value at the index specified.
|
java.lang.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,
java.lang.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.
|
addPropertyTabs, applyProperties, clone, cloneMe, closePropertiesDialog, decrSize, doAllObs, draw, getActive, getBounds, getColorMappings, getColorParam, getColorTable, getColorTableParam, getColorTableRange, getColorTableUnit, getColorTableUnitName, getDesc, getDisplayUnit, getDisplayUnitName, getLabel, getMissing, getName, getParam, getParamDescs, getParamIds, getRectPoint, getRotateInfo, getRotateXInfo, getRotateYInfo, getRotateZInfo, getScale, getScaleDataRange, getScaleParam, getScaleRange, getScaleUnit, getScaleUnitName, getXOffset, getYOffset, incrSize, initialize, initPropertyComponents, makeShapes, makeShapes, paint, paintSelection, 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, shouldShowColorTableGui, shouldShowRotateGui, shouldShowScaleGui, showDisplayUnitInProperties, showPropertiesDialog, toString
distance, getBottom, getBounds, getLeft, getPoint, getPositionAttr, getStretchPoint, 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, setStretchy, stretchTo, stretchTo, toRect, transformOutput, transformOutput, transformOutputX, transformOutputY
public static final double DEG_TO_RAD
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 canvaspublic WindBarbSymbol(int x, int y, java.lang.String uOrSpeedParam, java.lang.String uOrSpeedDescr, java.lang.String vOrDirParam, java.lang.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 descrpublic WindBarbSymbol(DisplayCanvas canvas, int x, int y, java.lang.String uOrSpeedParam, java.lang.String uOrSpeedDescr, java.lang.String vOrDirParam, java.lang.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 descrpublic boolean shouldScaleShape()
shouldScaleShape
in class MetSymbol
public boolean shouldOffsetShape()
shouldOffsetShape
in class MetSymbol
public boolean doAlignmentMenu()
MetSymbol
should show an
alignment menu in an editor. Subclasses should override if not.doAlignmentMenu
in class MetSymbol
public 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 java.lang.String getSpeedName()
public java.lang.String getDirectionName()
public boolean getStretchy()
MetSymbol
can be stretched or not.getStretchy
in class Glyph
public boolean getEqualSides()
MetSymbol
has equals sides
(width and height).getEqualSides
in class RectangleGlyph
public boolean getSymetricReshape()
MetSymbol
should be stretched
symetrically or not.getSymetricReshape
in class RectangleGlyph
public double getWindSpeed()
public void setWindSpeed(double windSpeed)
windSpeed
- speed in knotspublic double getWindDirection()
public void setWindDirection(double windDirection)
windDirection
- public void draw(java.awt.Graphics2D g, int x, int y, int width, int height)
protected WindBarbSymbol.WindDrawer makeDrawer()
public boolean rotateOnEarth()
rotateOnEarth
in class MetSymbol