|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.idv.control.drawing.DrawingGlyph
ucar.unidata.idv.control.drawing.LineGlyph
ucar.unidata.idv.control.drawing.ShapeGlyph
public class ShapeGlyph
Class ShapeGlyph. Displays a shape.
| Field Summary | |
|---|---|
static String |
ATTR_SHAPETYPE
Xml attribute name |
static int |
SHAPE_DIAMOND
Shape type |
static int |
SHAPE_HARROW
Shape type |
static int |
SHAPE_LINE
Shape type |
static String[] |
SHAPE_NAMES
Shape type names |
static int |
SHAPE_OVAL
Shape type |
static int |
SHAPE_RECTANGLE
Shape type |
static int |
SHAPE_VARROW
Shape type |
static int[] |
SHAPES
Shape types |
| Fields inherited from class ucar.unidata.idv.control.drawing.DrawingGlyph |
|---|
actualPoints, ATTR_COLOR, ATTR_COORDTYPE, ATTR_FILLED, ATTR_FULLLATLON, ATTR_LINEWIDTH, ATTR_NAME, ATTR_PICKABLE, ATTR_POINTS, ATTR_TEXT, ATTR_TIMES, ATTR_ZPOSITION, control, COORD_LABELS, COORD_LATLON, COORD_LATLONALT, COORD_NONE, COORD_TYPENAMES, COORD_TYPES, COORD_XY, COORD_XYZ, coordType, firstMoveEarthLocation, firstMoveLocation, IDX_ALT, IDX_LAT, IDX_LON, IDX_X, IDX_Y, IDX_Z, parentDisplayable, points, propDialog, propertiesUp, PT_X, PT_Y, PT_Z, selectionDisplayable, stretchIndex, tabbedPane, TAG_ARROW, TAG_FRONT, TAG_HIGH, TAG_IMAGE, TAG_LOW, TAG_MOVIE, TAG_POLYGON, TAG_SHAPE, TAG_SYMBOL, TAG_TEXT, uniqueCnt, zPosition |
| Constructor Summary | |
|---|---|
ShapeGlyph()
Ctor |
|
ShapeGlyph(DrawingControl control,
DisplayEvent event)
The ctor |
|
ShapeGlyph(DrawingControl control,
DisplayEvent event,
int shapeType)
The ctor |
|
| Method Summary | |
|---|---|
protected void |
addAttributes(Element e)
Populate the xml node with attrs |
boolean |
canShowArea()
Can we display area |
boolean |
canShowDistance()
Can we display distance |
protected boolean |
constrainedTo2D()
Is glyph constrained to 2d |
String |
getDescription()
Get the description of this glyph |
protected int |
getNumInterpolationPoints()
By default we don't interpolate |
int |
getShapeType()
Get the shape type |
String |
getTagName()
Get xml tag name to use |
String |
getTypeName()
Name to use for this glyph |
DrawingGlyph |
handleMouseDragged(DisplayEvent event)
Handle event |
DrawingGlyph |
handleMousePressed(DisplayEvent event)
Handle event |
void |
initFromXml(DrawingControl control,
Element node)
Init from xml |
static float[][] |
interpolate(int cnt,
float[] startXYZ,
float[] endXYZ)
Utility to interpolate cnt number of times between the start and end points |
boolean |
isValid()
Do we have a valid number of points |
static float[][] |
makeRectangle(float[][] lineVals)
Utility to make a rectangle from 2 points |
void |
setShapeType(int s)
Set the shapea |
void |
updateLocation()
The glyph moved. |
| Methods inherited from class ucar.unidata.idv.control.drawing.LineGlyph |
|---|
applyProperties, createDisplayable, getLineWidth, getPropertiesComponents, initFinalInner, initFromUser, setLineWidth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ATTR_SHAPETYPE
public static final int SHAPE_RECTANGLE
public static final int SHAPE_OVAL
public static final int SHAPE_LINE
public static final int SHAPE_DIAMOND
public static final int SHAPE_HARROW
public static final int SHAPE_VARROW
public static final int[] SHAPES
public static final String[] SHAPE_NAMES
| Constructor Detail |
|---|
public ShapeGlyph()
public ShapeGlyph(DrawingControl control,
DisplayEvent event)
throws VisADException,
RemoteException
control - The control I'm in.event - The display event.
RemoteException - When bad things happen
VisADException - When bad things happen
public ShapeGlyph(DrawingControl control,
DisplayEvent event,
int shapeType)
throws VisADException,
RemoteException
control - The control I'm in.event - The display event.shapeType - The shape type
RemoteException - When bad things happen
VisADException - When bad things happen| Method Detail |
|---|
public boolean canShowDistance()
canShowDistance in class DrawingGlyphpublic boolean canShowArea()
canShowArea in class DrawingGlyphpublic boolean isValid()
isValid in class DrawingGlyph
public DrawingGlyph handleMouseDragged(DisplayEvent event)
throws VisADException,
RemoteException
handleMouseDragged in class DrawingGlyphevent - The display event.
RemoteException - When bad things happen
VisADException - When bad things happen
public void initFromXml(DrawingControl control,
Element node)
throws VisADException,
RemoteException
initFromXml in class LineGlyphcontrol - The control I'm in.node - The xml node
RemoteException - On badness
VisADException - On badnessprotected boolean constrainedTo2D()
constrainedTo2D in class DrawingGlyphprotected void addAttributes(Element e)
addAttributes in class LineGlyphe - Xml nodepublic String getTagName()
getTagName in class DrawingGlyphprotected int getNumInterpolationPoints()
public static float[][] interpolate(int cnt,
float[] startXYZ,
float[] endXYZ)
cnt - Number of interpolation points inculding start and end pointstartXYZ - Start pointendXYZ - End point
public void updateLocation()
throws VisADException,
RemoteException
updateLocation in class DrawingGlyphRemoteException - On badness
VisADException - On badnesspublic static float[][] makeRectangle(float[][] lineVals)
lineVals - The 2 points
public DrawingGlyph handleMousePressed(DisplayEvent event)
throws VisADException,
RemoteException
handleMousePressed in class DrawingGlyphevent - The display event.
RemoteException - When bad things happen
VisADException - When bad things happenpublic String getTypeName()
getTypeName in class DrawingGlyphpublic String getDescription()
getDescription in class DrawingGlyphpublic int getShapeType()
public void setShapeType(int s)
s - Shape type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||