Package ucar.unidata.ui.symbol
Class LabelSymbol
java.lang.Object
ucar.unidata.ui.drawing.Glyph
ucar.unidata.ui.drawing.RectangleGlyph
ucar.unidata.ui.symbol.MetSymbol
ucar.unidata.ui.symbol.TextSymbol
ucar.unidata.ui.symbol.LabelSymbol
- All Implemented Interfaces:
Cloneable
Label symbol.
- Version:
- $Revision: 1.11 $
- Author:
- Metapps development team
-
Field Summary
Fields inherited from class ucar.unidata.ui.symbol.TextSymbol
FONT_SIZES, numberFormatStringFields inherited from class ucar.unidata.ui.symbol.MetSymbol
ATTR_PARAMID, canvas, propertiesDialogFields inherited from class ucar.unidata.ui.drawing.RectangleGlyph
ATTR_RECTTYPE, bounds, CIRCLE, FCIRCLE, FRECTANGLE, FROUNDRECT, RECTANGLE, ROUNDRECT, TYPE_CIRCLE, TYPE_RECT, TYPE_RRECTFields 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 constructor.LabelSymbol(int x, int y) Construct a LabelSymbol without a canvas at the position specified.LabelSymbol(DisplayCanvas canvas, int x, int y) Construct a LabelSymbol to use on the canvas specified at the position specified. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidApply properties from the properties dialog.booleanGet whether thisMetSymbolhas equals sides (width and height).getLabel()Get a label for this symbol.String[]Get the parameter ids for thisMetSymbol.getParamValue(int index) Get the parameter value at the index specified.booleanGet whether thisMetSymbolcan be stretched or not.getText()get the value stringprotected StringGet the value stringprotected voidinitPropertyComponents(List comps) Add any components to the list of widgets for the main property dialog tab.voidsetStretchy(boolean s) Is this stretchytoString()String representation of this object.booleanShould this symbol do all of the observations.xxxmakeShapes(PointOb ob) Make the shapes.Methods inherited from class ucar.unidata.ui.symbol.TextSymbol
decrFontSize, draw, format, format, format, formatNumber, getCurrFontNo, getFont, getFontList, getFontMetrics, getFontSize, getNumberFormatString, getValue, incrFontSize, makeDefaultFont, setCurrFontNo, setFont, setFontSize, setNumberFormatString, setParamValue, setValue, setValueMethods inherited from class ucar.unidata.ui.symbol.MetSymbol
addPropertyTabs, clone, cloneMe, closePropertiesDialog, decrSize, doAlignmentMenu, doAllObs, draw, getActive, getBounds, getColorMappings, getColorParam, getColorTable, getColorTableParam, getColorTableRange, getColorTableUnit, getColorTableUnitName, getDesc, getDisplayUnit, getDisplayUnitName, getMissing, getName, getParam, getParamDescs, getRectPoint, getRotateInfo, getRotateXInfo, getRotateYInfo, getRotateZInfo, getScale, getScaleDataRange, getScaleParam, getScaleRange, getScaleUnit, getScaleUnitName, getXOffset, getYOffset, incrSize, initialize, 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, showPropertiesDialogMethods inherited from class ucar.unidata.ui.drawing.RectangleGlyph
distance, getBottom, getBounds, getLeft, getPoint, getPositionAttr, getStretchPoint, getSymetricReshape, getTop, moveBy, moveTo, setPoints, setSize, setType, stretchToMethods 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, stretchTo, stretchTo, toRect, transformOutput, transformOutput, transformOutputX, transformOutputY
-
Constructor Details
-
LabelSymbol
public LabelSymbol()Default constructor. -
LabelSymbol
public LabelSymbol(int x, int y) Construct a LabelSymbol without a canvas at the position specified. Use the parameter names and long names specified.- Parameters:
x- x positiony- y position
-
LabelSymbol
Construct a LabelSymbol to use on the canvas specified at the position specified. Use the parameter names and long names specified.- Parameters:
canvas- canvas to draw on.x- x position on the canvasy- y position on the canvas
-
-
Method Details
-
initPropertyComponents
Add any components to the list of widgets for the main property dialog tab.- Overrides:
initPropertyComponentsin classMetSymbol- Parameters:
comps- List of components.
-
applyProperties
protected void applyProperties()Apply properties from the properties dialog.- Overrides:
applyPropertiesin classMetSymbol
-
getParamIds
Get the parameter ids for thisMetSymbol.- Overrides:
getParamIdsin classMetSymbol- Returns:
- array of parameter ids
-
getStretchy
public boolean getStretchy()Get whether thisMetSymbolcan be stretched or not.- Overrides:
getStretchyin classGlyph- Returns:
- true if can be stretched.
-
setStretchy
public void setStretchy(boolean s) Is this stretchy- Overrides:
setStretchyin classGlyph- Parameters:
s- Is this stretchy
-
getParamValue
Get the parameter value at the index specified.- Overrides:
getParamValuein classTextSymbol- Parameters:
index- index into param array- Returns:
- value of uOrSpeedParam if index = 0, otherwise vOrDirParam value
-
getValueString
Get the value string- Overrides:
getValueStringin classTextSymbol- Returns:
- a string representation of the size
-
getEqualSides
public boolean getEqualSides()Get whether thisMetSymbolhas equals sides (width and height).- Overrides:
getEqualSidesin classRectangleGlyph- Returns:
- true
-
xxxdoAllObs
public boolean xxxdoAllObs()Should this symbol do all of the observations. Used by the StationModelDisplayable to determine if makeShapes should be called.- Returns:
- Do all obs - true.
-
xxxmakeShapes
Make the shapes.- Parameters:
ob- The observation. We don't use this.- Returns:
- The array of shapes.
-
getText
get the value string- Returns:
- value string
-
getLabel
Get a label for this symbol.- Overrides:
getLabelin classTextSymbol- Returns:
- a human readable label
-
toString
String representation of this object.- Overrides:
toStringin classTextSymbol- Returns:
- String version of this object.
-