Package ucar.unidata.ui.symbol
Class ThreeDCrossSymbol
java.lang.Object
ucar.unidata.ui.drawing.Glyph
ucar.unidata.ui.drawing.RectangleGlyph
ucar.unidata.ui.symbol.MetSymbol
ucar.unidata.ui.symbol.ThreeDCrossSymbol
- All Implemented Interfaces:
Cloneable
draws a symbol for a location point indicaiton,
in 3D which is very simple (small number of graphic elements)
so that large numbers of symbols can be displayed (like 5000).
- Version:
- $Id: $
- Author:
-
Field Summary
Fields 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 constructorThreeDCrossSymbol(int x, int y) Create a symbol at the x and y position of the "station model editor" ; this is relative to the editor's screen center point.ThreeDCrossSymbol(int x, int y, String param, String paramDesc) Create a symbol at the x and y position.ThreeDCrossSymbol(DisplayCanvas canvas, int x, int y) Create a symbol at the x and y position on the supplied canvas.ThreeDCrossSymbol(DisplayCanvas canvas, int x, int y, String param, String paramDesc) Create a symbol at the x and y position on theDisplayCanvassupplied. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidApply properties from the properties dialog.booleandoAllObs()Should this symbol do all of the observations.voiddraw(Graphics2D g, int x, int y, int width, int height) draw a little cross at the specified location in the station model editor only -- NOT the IDV data display.booleanGet whether thisMetSymbolhas equals sides (width and height).getParamValue(int index) Get the parameter value at the index specified.booleanGet whether thisMetSymbolcan be stretched or not.protected voidinitPropertyComponents(List comps) Add any components to the list of widgets for the main property dialog tab.makeShapes(PointOb ob) Make the "shapes", the plot symbol.voidsetParamValue(int index, Object v) Set the parameter value at the index specified.voidsetStretchy(boolean s) Is this stretchybooleanIs used by the StationModelDisplayable to determine if the color of the shapes should be set.booleanFrom Unidata: "I have code that takes the shapes for a symbol and moves them by some offset wrt the origin.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, getLabel, getMissing, getName, getParam, getParamDescs, getParamIds, getRectPoint, getRotateInfo, getRotateXInfo, getRotateYInfo, getRotateZInfo, getScale, getScaleDataRange, getScaleParam, getScaleRange, getScaleUnit, getScaleUnitName, getXOffset, getYOffset, incrSize, initialize, 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, shouldScaleShape, shouldShowColorTableGui, shouldShowRotateGui, shouldShowScaleGui, showDisplayUnitInProperties, showPropertiesDialog, toStringMethods 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
-
ThreeDCrossSymbol
public ThreeDCrossSymbol()Default constructor -
ThreeDCrossSymbol
public ThreeDCrossSymbol(int x, int y) Create a symbol at the x and y position of the "station model editor" ; this is relative to the editor's screen center point.- Parameters:
x- x offset from centery- y offset from center
-
ThreeDCrossSymbol
Create a 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-DisplayCanvasto draw onx- x offset from centery- y offset from center
-
ThreeDCrossSymbol
Create a 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 thisGPSVectorSymbolparamDesc- description (long name) ofparam
-
ThreeDCrossSymbol
Create a symbol at the x and y position on theDisplayCanvassupplied. Position is relative to the center point. Use parameter and description provided.- Parameters:
canvas-DisplayCanvasto draw onx- x offset from centery- y offset from centerparam- parameter name for thisGPSVectorSymbolparamDesc- description (long name) ofparam
-
-
Method Details
-
shouldOffsetShape
public boolean shouldOffsetShape()From Unidata: "I have code that takes the shapes for a symbol and moves them by some offset wrt the origin. However, I move each individual shape in the array. Thus the recentering all problem. A workaround for now is to overwrite the method shouldOffsetShape(). This turns off any relative repositioning."- Overrides:
shouldOffsetShapein classMetSymbol- Returns:
- Should the shapes be offset
-
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
-
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
-
getEqualSides
public boolean getEqualSides()Get whether thisMetSymbolhas equals sides (width and height).- Overrides:
getEqualSidesin classRectangleGlyph- Returns:
- true
-
getParamValue
Get the parameter value at the index specified. ??? fix- Overrides:
getParamValuein classMetSymbol- Parameters:
index- index into param array- Returns:
- always returns the magnitude as a
Double
-
setParamValue
Set the parameter value at the index specified. Since thisMetSymbolonly has one parameter, it sets the value at index 0.- Overrides:
setParamValuein classMetSymbol- Parameters:
index- parameter index. Ignored in this object.v- value for the parameter (String representation of magnitude).
-
doAllObs
public boolean doAllObs()Should this symbol do all of the observations. Used by the StationModelDisplayable to determine if makeShapes should be called. -
shouldBeColored
public boolean shouldBeColored()Is used by the StationModelDisplayable to determine if the color of the shapes should be set. NOTE - if true, that means the IDV core code OVERRIDES colors defined here; and everything is drawn pink or black or something, all the same color.- Overrides:
shouldBeColoredin classMetSymbol- Returns:
- Should the shapes be colored
-
makeShapes
Make the "shapes", the plot symbol. one symbol is made of several "shapes"; for one data point observation In this case a 3D "cross" of 3 straight arms.- Overrides:
makeShapesin classMetSymbol- Parameters:
ob- The observation, or data value in a PointOb object.- Returns:
- The array of shapes.
-
draw
draw a little cross at the specified location in the station model editor only -- NOT the IDV data display. NOTE THIS ONLY DRAWS IN THE STATION MODEL EDITOR WINDOW; IT DOES NOT MAKE THE DATA DISPLAY SYMBOLS;
-