public class WeatherSymbol extends MetSymbol implements java.awt.image.ImageObserver
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTR_SYMBOLTYPE
Symbol type attribute
|
static int |
SYMBOL_ALL
All symbols index
|
static int |
SYMBOL_CLOUDCOVERAGE
Cloud coverage symbol index
|
static int |
SYMBOL_HIGHCLOUD
High cloud symbol index
|
static int |
SYMBOL_ICING
Icing symbol index
|
static int |
SYMBOL_LIGHTNING
Lightning symbol index
|
static int |
SYMBOL_LOWCLOUD
Low cloud symbol index
|
static int |
SYMBOL_MIDCLOUD
Mid cloud symbol index
|
static int |
SYMBOL_MISC
Miscellaneous symbol index
|
static int |
SYMBOL_PRESENTWEATHER
Present weather symbol index
|
static int |
SYMBOL_PRESSURETENDENCY
Pressure tendency symbol index
|
static int |
SYMBOL_TURBULENCE
Turbulence symbol index
|
static java.lang.String[] |
SYMBOLNAMES
Symbol names
|
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 |
---|
WeatherSymbol()
Default constructor.
|
WeatherSymbol(DisplayCanvas canvas,
int x,
int y)
Create a
WeatherSymbol on the canvas specified
at the position indicated. |
WeatherSymbol(DisplayCanvas canvas,
int x,
int y,
java.lang.String param,
java.lang.String paramDesc)
Create a
WeatherSymbol on canvas
at the position indicated and use the name and description supplied. |
WeatherSymbol(int x,
int y)
Create a
WeatherSymbol at the position indicated. |
WeatherSymbol(int x,
int y,
java.lang.String param,
java.lang.String paramDesc)
Create a
WeatherSymbol at the position indicated and
use the name and description supplied. |
Modifier and Type | Method and Description |
---|---|
void |
draw(java.awt.Graphics2D g,
int x,
int y,
int width,
int height)
Draw this object to the graphics device.
|
int |
getCode()
Get the code (index) for this symbol type.
|
boolean |
getEqualSides()
Get whether this
MetSymbol has equals sides
(width and height). |
java.lang.String |
getLabel()
Get the label to show the user
|
visad.VisADLineArray |
getLines(int index)
Gets the VisADLineArray that corresponds to the index for the
symbol type.
|
static visad.VisADLineArray |
getLines(int symbolType,
int code)
Gets the VisADLineArray that corresponds to the code for the
symbol type.
|
java.lang.Object |
getParamValue(int index)
Get the value for the parameter at the particular index.
|
boolean |
getStretchy()
Get whether this
MetSymbol can be stretched or not. |
int |
getSymbolType()
Get the symbol type for this
WeatherSymbol . |
boolean |
getSymetricReshape()
Get whether this
MetSymbol should be stretched
symetrically or not. |
boolean |
imageUpdate(java.awt.Image img,
int flags,
int x,
int y,
int width,
int height)
This method is called when information about an image which
was previously requested using an asynchronous interface
becomes available, public due do implementing
ImageObserver . |
void |
setAttr(java.lang.String name,
java.lang.String value)
Set the attribute with the value supplied.
|
void |
setCode(int value)
Set the code (index) for this symbol type.
|
void |
setParamValue(int index,
java.lang.Object v)
Set the value for the parameter at the particular index.
|
void |
setSymbolType(int value)
Set the type of symbol that this is.
|
addPropertyTabs, applyProperties, clone, cloneMe, closePropertiesDialog, decrSize, doAlignmentMenu, doAllObs, 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, initialize, initPropertyComponents, makeShapes, makeShapes, paint, paintSelection, rotateOnEarth, setActive, 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, 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 int SYMBOL_CLOUDCOVERAGE
public static final int SYMBOL_PRESENTWEATHER
public static final int SYMBOL_LOWCLOUD
public static final int SYMBOL_MIDCLOUD
public static final int SYMBOL_HIGHCLOUD
public static final int SYMBOL_PRESSURETENDENCY
public static final int SYMBOL_ICING
public static final int SYMBOL_TURBULENCE
public static final int SYMBOL_LIGHTNING
public static final int SYMBOL_MISC
public static final int SYMBOL_ALL
public static final java.lang.String[] SYMBOLNAMES
public static final java.lang.String ATTR_SYMBOLTYPE
public WeatherSymbol()
public WeatherSymbol(int x, int y)
WeatherSymbol
at the position indicated.x
- x coordinatey
- y coordinatepublic WeatherSymbol(DisplayCanvas canvas, int x, int y)
WeatherSymbol
on the canvas specified
at the position indicated.canvas
- canvas for displaying this symbolx
- x coordinatey
- y coordinatepublic WeatherSymbol(int x, int y, java.lang.String param, java.lang.String paramDesc)
WeatherSymbol
at the position indicated and
use the name and description supplied.x
- x coordinatey
- y coordinateparam
- parameter nameparamDesc
- parameter description (used in labels, widgets)public WeatherSymbol(DisplayCanvas canvas, int x, int y, java.lang.String param, java.lang.String paramDesc)
WeatherSymbol
on canvas
at the position indicated and use the name and description supplied.canvas
- canvas for displaying this symbolx
- x coordinatey
- y coordinateparam
- parameter nameparamDesc
- parameter description (used in labels, widgets)public java.lang.String getLabel()
public boolean imageUpdate(java.awt.Image img, int flags, int x, int y, int width, int height)
ImageObserver
.imageUpdate
in interface java.awt.image.ImageObserver
img
- image being observedflags
- information flagsx
- x coordinatey
- y coordinatewidth
- the widthheight
- the heightfalse
if the infoflags indicate that the
image is completely loaded; true
otherwise.public void setSymbolType(int value)
value
- symbol type (e.g., SYMBOL_LOWCLOUD)public visad.VisADLineArray getLines(int index)
index
- index for this symbolType.getLines(int, int)
public static visad.VisADLineArray getLines(int symbolType, int code)
symbolType
- type of symbolcode
- code for the particular item in this symbol typegetLines(int, int)
public java.lang.Object getParamValue(int index)
getParamValue
in class MetSymbol
index
- parameter index (ignored)Integer
public void setParamValue(int index, java.lang.Object v)
setParamValue
in class MetSymbol
index
- parameter index (ignored)v
- value (String version of integer code)public int getSymbolType()
WeatherSymbol
. Used
primarily for persistence.public void setCode(int value)
value
- code for the index for this symbol type.WeatherSymbols
public int getCode()
WeatherSymbols
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 void draw(java.awt.Graphics2D g, int x, int y, int width, int height)