ucar.unidata.ui.symbol
Class ValueSymbol

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.TextSymbol
                  extended by ucar.unidata.ui.symbol.ValueSymbol
All Implemented Interfaces:
Cloneable

public class ValueSymbol
extends TextSymbol

Value Symbol meteorological Symbol. Used for displaying numeric values in specific units.

Version:
$Revision: 1.21 $
Author:
MetApps Development Team

Field Summary
 
Fields inherited from class ucar.unidata.ui.symbol.TextSymbol
FONT_SIZES, numberFormatString
 
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
ValueSymbol()
          Default ctor
ValueSymbol(DisplayCanvas canvas, int x, int y)
          Create a new ValueSymbol
ValueSymbol(DisplayCanvas canvas, int x, int y, String param, String paramDesc)
          Create a new ValueSymbol
ValueSymbol(DisplayCanvas canvas, int x, int y, String param, String paramDesc, Unit u)
          Create a new ValueSymbol
ValueSymbol(int x, int y, String param, String paramDesc)
          Create a new ValueSymbol
ValueSymbol(int x, int y, String param, String paramDesc, Unit unit)
          Create a new ValueSymbol
 
Method Summary
 double getDoubleValue()
          Get the value as a double
 String getLabel()
          Get the label to show the user what I am in the properties
 Object getParamValue(int index)
          Get the parameter value at the particular index
 void setDoubleValue(double value)
          Set the double value
 void setParamValue(int index, Object v)
          Set the parameter value at the particular index
protected  boolean showDisplayUnitInProperties()
          Should we show the display unit widget in the properties dialog
 
Methods inherited from class ucar.unidata.ui.symbol.TextSymbol
decrFontSize, draw, format, format, format, formatNumber, getCurrFontNo, getFont, getFontList, getFontMetrics, getFontSize, getNumberFormatString, getValue, getValueString, incrFontSize, makeDefaultFont, setCurrFontNo, setFont, setFontSize, setNumberFormatString, setValue, setValue, toString
 
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, 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, showPropertiesDialog
 
Methods inherited from class ucar.unidata.ui.drawing.RectangleGlyph
distance, getBottom, getBounds, getEqualSides, getLeft, getPoint, getPositionAttr, getStretchPoint, getSymetricReshape, 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, getStretchy, 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

ValueSymbol

public ValueSymbol()
Default ctor


ValueSymbol

public ValueSymbol(DisplayCanvas canvas,
                   int x,
                   int y)
Create a new ValueSymbol

Parameters:
canvas - canvas for painting
x - x position
y - y position

ValueSymbol

public ValueSymbol(int x,
                   int y,
                   String param,
                   String paramDesc,
                   Unit unit)
Create a new ValueSymbol

Parameters:
x - x position
y - y position
param - the parameter name
paramDesc - the parameter description
unit - the unit for the param

ValueSymbol

public ValueSymbol(int x,
                   int y,
                   String param,
                   String paramDesc)
Create a new ValueSymbol

Parameters:
x - x position
y - y position
param - the parameter name
paramDesc - the parameter description

ValueSymbol

public ValueSymbol(DisplayCanvas canvas,
                   int x,
                   int y,
                   String param,
                   String paramDesc)
Create a new ValueSymbol

Parameters:
canvas - canvas to paint on
x - x position
y - y position
param - the parameter name
paramDesc - the parameter description

ValueSymbol

public ValueSymbol(DisplayCanvas canvas,
                   int x,
                   int y,
                   String param,
                   String paramDesc,
                   Unit u)
Create a new ValueSymbol

Parameters:
canvas - canvas to paint on
x - x position
y - y position
param - the parameter name
paramDesc - the parameter description
u - the unit
Method Detail

showDisplayUnitInProperties

protected boolean showDisplayUnitInProperties()
Should we show the display unit widget in the properties dialog

Overrides:
showDisplayUnitInProperties in class MetSymbol
Returns:
true

getLabel

public String getLabel()
Get the label to show the user what I am in the properties

Overrides:
getLabel in class TextSymbol
Returns:
The label

getParamValue

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

Overrides:
getParamValue in class TextSymbol
Parameters:
index - index into list of params
Returns:
the value

setParamValue

public void setParamValue(int index,
                          Object v)
Set the parameter value at the particular index

Overrides:
setParamValue in class TextSymbol
Parameters:
index - index into list of params
v - the value

getDoubleValue

public double getDoubleValue()
Get the value as a double

Returns:
the double value

setDoubleValue

public void setDoubleValue(double value)
Set the double value

Parameters:
value - the value