Package ucar.unidata.ui.symbol
Class CloudCoverageSymbol
java.lang.Object
ucar.unidata.ui.drawing.Glyph
ucar.unidata.ui.drawing.RectangleGlyph
ucar.unidata.ui.symbol.MetSymbol
ucar.unidata.ui.symbol.CloudCoverageSymbol
- All Implemented Interfaces:
Cloneable
Cloud coverage meteorological symbols.
- Version:
- $Revision: 1.17 $
- Author:
- Metapps development team
-
Field Summary
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
ConstructorsConstructorDescriptionDefault constructorCloudCoverageSymbol
(int x, int y) Create a cloud coverage symbol at the x and y position.CloudCoverageSymbol
(int x, int y, String param, String paramDesc) Create a cloud coverage symbol at the x and y position.CloudCoverageSymbol
(DisplayCanvas canvas, int x, int y) Create a cloud coverage symbol at the x and y position on the supplied canvas.CloudCoverageSymbol
(DisplayCanvas canvas, int x, int y, String param, String paramDesc) Create a cloud coverage symbol at the x and y position on theDisplayCanvas
supplied. -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(Graphics2D g, int x, int y, int width, int height) draw the symbol at the specified locationdouble
Get the coverage value : lies between 0 and 100 (%)boolean
Get whether thisMetSymbol
has equals sides (width and height).getParamValue
(int index) Get the parameter value at the index specified.boolean
Get whether thisMetSymbol
can be stretched or not.boolean
Get whether thisMetSymbol
should be stretched symetrically or not.void
setCoverage
(double coverage) Set the coverage value : lies between 0 and 100 (%)void
setParamValue
(int index, Object v) Set the parameter value at the index specified.Methods inherited from class ucar.unidata.ui.symbol.MetSymbol
addPropertyTabs, applyProperties, clone, cloneMe, closePropertiesDialog, decrSize, doAlignmentMenu, 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, 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
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
-
Constructor Details
-
CloudCoverageSymbol
public CloudCoverageSymbol()Default constructor -
CloudCoverageSymbol
public CloudCoverageSymbol(int x, int y) Create a cloud coverage symbol at the x and y position. Position is relative to the center point. Use default parameter and description.- Parameters:
x
- x offset from centery
- y offset from center
-
CloudCoverageSymbol
Create a cloud coverage symbol at the x and y position on the supplied canvas. Position is relative to the center point. Use default parameter and description.- Parameters:
canvas
-DisplayCanvas
to draw onx
- x offset from centery
- y offset from center
-
CloudCoverageSymbol
Create a cloud coverage symbol at the x and y position. Position is relative to the center point. Use parameter and description provided.- Parameters:
x
- x offset from centery
- y offset from centerparam
- parameter name for thisCloudCoverageSymbol
paramDesc
- description (long name) ofparam
-
CloudCoverageSymbol
Create a cloud coverage symbol at the x and y position on theDisplayCanvas
supplied. Position is relative to the center point. Use parameter and description provided.- Parameters:
canvas
-DisplayCanvas
to draw onx
- x offset from centery
- y offset from centerparam
- parameter name for thisCloudCoverageSymbol
paramDesc
- description (long name) ofparam
-
-
Method Details
-
getStretchy
public boolean getStretchy()Get whether thisMetSymbol
can be stretched or not.- Overrides:
getStretchy
in classGlyph
- Returns:
- true if can be stretched.
-
getEqualSides
public boolean getEqualSides()Get whether thisMetSymbol
has equals sides (width and height).- Overrides:
getEqualSides
in classRectangleGlyph
- Returns:
- true
-
getSymetricReshape
public boolean getSymetricReshape()Get whether thisMetSymbol
should be stretched symetrically or not.- Overrides:
getSymetricReshape
in classRectangleGlyph
- Returns:
- true
-
getCoverage
public double getCoverage()Get the coverage value : lies between 0 and 100 (%)- Returns:
- coverage in percent
-
setCoverage
public void setCoverage(double coverage) Set the coverage value : lies between 0 and 100 (%)- Parameters:
coverage
- coverage in percent
-
getParamValue
Get the parameter value at the index specified.- Overrides:
getParamValue
in classMetSymbol
- Parameters:
index
- index into param array- Returns:
- always returns the coverage as a
Double
-
setParamValue
Set the parameter value at the index specified. Since thisMetSymbol
only has one parameter, it sets the value at index 0.- Overrides:
setParamValue
in classMetSymbol
- Parameters:
index
- parameter index. Ignored in this object.v
- value for the parameter (String representation of coverage).- See Also:
-
draw
draw the symbol at the specified location
-