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, 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 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 theDisplayCanvas
supplied. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Apply properties from the properties dialog.boolean
doAllObs()
Should this symbol do all of the observations.void
draw
(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.boolean
Get whether thisMetSymbol
has equals sides (width and height).getParamValue
(int index) Get the parameter value at the index specified.boolean
Get whether thisMetSymbol
can be stretched or not.protected void
initPropertyComponents
(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.void
setParamValue
(int index, Object v) Set the parameter value at the index specified.void
setStretchy
(boolean s) Is this stretchyboolean
Is used by the StationModelDisplayable to determine if the color of the shapes should be set.boolean
From 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, 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
-
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
-DisplayCanvas
to 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 thisGPSVectorSymbol
paramDesc
- description (long name) ofparam
-
ThreeDCrossSymbol
Create a symbol at the x and y position on theDisplayCanvas
supplied. Position is relative to the center point. Use parameter and description provided.- Parameters:
canvas
-DisplayCanvas
to draw onx
- x offset from centery
- y offset from centerparam
- parameter name for thisGPSVectorSymbol
paramDesc
- 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:
shouldOffsetShape
in classMetSymbol
- Returns:
- Should the shapes be offset
-
initPropertyComponents
Add any components to the list of widgets for the main property dialog tab.- Overrides:
initPropertyComponents
in classMetSymbol
- Parameters:
comps
- List of components.
-
applyProperties
protected void applyProperties()Apply properties from the properties dialog.- Overrides:
applyProperties
in classMetSymbol
-
getStretchy
public boolean getStretchy()Get whether thisMetSymbol
can be stretched or not.- Overrides:
getStretchy
in classGlyph
- Returns:
- true if can be stretched.
-
setStretchy
public void setStretchy(boolean s) Is this stretchy- Overrides:
setStretchy
in classGlyph
- Parameters:
s
- Is this stretchy
-
getEqualSides
public boolean getEqualSides()Get whether thisMetSymbol
has equals sides (width and height).- Overrides:
getEqualSides
in classRectangleGlyph
- Returns:
- true
-
getParamValue
Get the parameter value at the index specified. ??? fix- Overrides:
getParamValue
in 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 thisMetSymbol
only has one parameter, it sets the value at index 0.- Overrides:
setParamValue
in 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:
shouldBeColored
in 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:
makeShapes
in 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;
-