Package ucar.unidata.ui.symbol
Class MappedShapeSymbol
java.lang.Object
ucar.unidata.ui.drawing.Glyph
ucar.unidata.ui.drawing.RectangleGlyph
ucar.unidata.ui.symbol.MetSymbol
ucar.unidata.ui.symbol.ShapeSymbol
ucar.unidata.ui.symbol.MappedShapeSymbol
- All Implemented Interfaces:
Cloneable
This is a symbol that holds a list of ShapeMap-s.
It allows us to map a string pattern to a particular shape type.
For example, if a point obs has a filed: aircraft_type which can contain
the values:
military glider civilian ...This symbol could hold the shape maps:
military -> triangle glider -> circle civilian->square ...
- Version:
- $Revision: 1.8 $
- Author:
- Metapps development team
-
Field Summary
Fields inherited from class ucar.unidata.ui.symbol.ShapeSymbol
ATTR_POINTS, ATTR_SHAPE, ATTR_SHAPETYPE, TYPE_LINE, TYPE_QUAD, TYPE_TRIANGLE
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 constructor.MappedShapeSymbol
(int x, int y) Construct a ShapeSymbol without a canvas at the position specified.MappedShapeSymbol
(DisplayCanvas canvas, int x, int y) Construct a ShapeSymbol to use on the canvas specified at the position specified. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Apply properties from the properties dialog.boolean
doAllObs()
Should this symbol do all of the observations.getLabel()
Get the labelGet the ShapeMappings property.protected void
initPropertyComponents
(List comps) Add any components to the list of widgets for the main property dialog tab.makeShapes
(Data[] dataArray, PointOb ob) If this symbol is not one of the 'known' symbols then this method is called to create the shapes.void
setShapeMappings
(List value) Set the ShapeMappings property.protected boolean
Should we show the display unit widget in the properties dialogMethods inherited from class ucar.unidata.ui.symbol.ShapeSymbol
draw, getEqualSides, getParamValue, getPoints, getShape, getShapeType, getStretchy, initialize, makeShapePropertyComponents, makeShapes, setParamValue, setPoints, setShape, setShapeType, setStretchy
Methods inherited from class ucar.unidata.ui.symbol.MetSymbol
addPropertyTabs, clone, cloneMe, closePropertiesDialog, decrSize, doAlignmentMenu, 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, 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, toString
Methods inherited from class ucar.unidata.ui.drawing.RectangleGlyph
distance, getBottom, getBounds, 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, getXml, initDone, makeAttr, notifyChange, paintHighlight, paintSelectionPoints, pickable, processAttrs, setBackground, setBeingCreated, setFilled, setForeground, setId, setLineWidth, setParent, stretchTo, stretchTo, toRect, transformOutput, transformOutput, transformOutputX, transformOutputY
-
Constructor Details
-
MappedShapeSymbol
public MappedShapeSymbol()Default constructor. -
MappedShapeSymbol
public MappedShapeSymbol(int x, int y) Construct a ShapeSymbol without a canvas at the position specified. Use the parameter names and long names specified.- Parameters:
x
- x positiony
- y position
-
MappedShapeSymbol
Construct a ShapeSymbol 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
-
getLabel
Get the label- Overrides:
getLabel
in classShapeSymbol
- Returns:
- Label for gui
-
initPropertyComponents
Add any components to the list of widgets for the main property dialog tab.- Overrides:
initPropertyComponents
in classShapeSymbol
- Parameters:
comps
- List of components.
-
applyProperties
protected void applyProperties()Apply properties from the properties dialog.- Overrides:
applyProperties
in classShapeSymbol
-
doAllObs
public boolean doAllObs()Should this symbol do all of the observations. Used by the StationModelDisplayable to determine if makeShapes should be called.- Overrides:
doAllObs
in classShapeSymbol
- Returns:
- Do all obs - true.
-
makeShapes
If this symbol is not one of the 'known' symbols then this method is called to create the shapes.- Overrides:
makeShapes
in classMetSymbol
- Parameters:
dataArray
- The array of data objects. May have 0 or more data depending on the paramids.ob
- The observation- Returns:
- The shapes
- Throws:
Exception
- On badness
-
showDisplayUnitInProperties
protected boolean showDisplayUnitInProperties()Should we show the display unit widget in the properties dialog- Overrides:
showDisplayUnitInProperties
in classMetSymbol
- Returns:
- true
-
setShapeMappings
Set the ShapeMappings property.- Parameters:
value
- The new value for ShapeMappings
-
getShapeMappings
Get the ShapeMappings property.- Returns:
- The ShapeMappings
-