ucar.unidata.ui.symbol
Class CloudCoverageSymbol

java.lang.Object
  extended by ucar.unidata.ui.drawing.Glyph
      extended by ucar.unidata.ui.drawing.RectangleGlyph
          extended by ucar.unidata.ui.symbol.MetSymbol
              extended by ucar.unidata.ui.symbol.CloudCoverageSymbol
All Implemented Interfaces:
Cloneable

public class CloudCoverageSymbol
extends MetSymbol

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
CloudCoverageSymbol()
          Default constructor
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 the DisplayCanvas supplied.
CloudCoverageSymbol(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.
 
Method Summary
 void draw(Graphics2D g, int x, int y, int width, int height)
          draw the symbol at the specified location
 double getCoverage()
          Get the coverage value : lies between 0 and 100 (%)
 boolean getEqualSides()
          Get whether this MetSymbol has equals sides (width and height).
 Object getParamValue(int index)
          Get the parameter value at the index specified.
 boolean getStretchy()
          Get whether this MetSymbol can be stretched or not.
 boolean getSymetricReshape()
          Get whether this MetSymbol 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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 center
y - y offset from center

CloudCoverageSymbol

public CloudCoverageSymbol(DisplayCanvas canvas,
                           int x,
                           int y)
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 on
x - x offset from center
y - y offset from center

CloudCoverageSymbol

public CloudCoverageSymbol(int x,
                           int y,
                           String param,
                           String paramDesc)
Create a cloud coverage symbol at the x and y position. Position is relative to the center point. Use parameter and description provided.

Parameters:
param - parameter name for this CloudCoverageSymbol
paramDesc - description (long name) of param
x - x offset from center
y - y offset from center

CloudCoverageSymbol

public CloudCoverageSymbol(DisplayCanvas canvas,
                           int x,
                           int y,
                           String param,
                           String paramDesc)
Create a cloud coverage symbol at the x and y position on the DisplayCanvas supplied. Position is relative to the center point. Use parameter and description provided.

Parameters:
canvas - DisplayCanvas to draw on
param - parameter name for this CloudCoverageSymbol
paramDesc - description (long name) of param
x - x offset from center
y - y offset from center
Method Detail

getStretchy

public boolean getStretchy()
Get whether this MetSymbol can be stretched or not.

Overrides:
getStretchy in class Glyph
Returns:
true if can be stretched.

getEqualSides

public boolean getEqualSides()
Get whether this MetSymbol has equals sides (width and height).

Overrides:
getEqualSides in class RectangleGlyph
Returns:
true

getSymetricReshape

public boolean getSymetricReshape()
Get whether this MetSymbol should be stretched symetrically or not.

Overrides:
getSymetricReshape in class RectangleGlyph
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

public Object getParamValue(int index)
Get the parameter value at the index specified.

Overrides:
getParamValue in class MetSymbol
Parameters:
index - index into param array
Returns:
always returns the coverage as a Double

setParamValue

public void setParamValue(int index,
                          Object v)
Set the parameter value at the index specified. Since this MetSymbol only has one parameter, it sets the value at index 0.

Overrides:
setParamValue in class MetSymbol
Parameters:
index - parameter index. Ignored in this object.
v - value for the parameter (String representation of coverage).
See Also:
setCoverage(double)

draw

public void draw(Graphics2D g,
                 int x,
                 int y,
                 int width,
                 int height)
draw the symbol at the specified location

Specified by:
draw in class MetSymbol
Parameters:
g - Graphics2D object
x - x position
y - y position
width - width of symbol
height - height of symbol