ucar.unidata.idv.control.drawing
Class FrontGlyph

java.lang.Object
  extended by ucar.unidata.idv.control.drawing.DrawingGlyph
      extended by ucar.unidata.idv.control.drawing.LineGlyph
          extended by ucar.unidata.idv.control.drawing.PolyGlyph
              extended by ucar.unidata.idv.control.drawing.FrontGlyph
Direct Known Subclasses:
ArrowGlyph

public class FrontGlyph
extends PolyGlyph

Class FrontGlyph draws fronts

Version:
$Revision: 1.16 $
Author:
IDV Development Team

Field Summary
static String ATTR_FRONTSCALE
          xml attribute for the scale for the front
static String ATTR_FRONTTYPE
          Xml attribute name
 
Fields inherited from class ucar.unidata.idv.control.drawing.PolyGlyph
ATTR_EXTRUDE, ATTR_SMOOTH, IDX_X, IDX_Y, IDX_Z
 
Fields inherited from class ucar.unidata.idv.control.drawing.DrawingGlyph
actualPoints, ATTR_BGCOLOR, ATTR_COLOR, ATTR_COORDTYPE, ATTR_FILLED, ATTR_FULLLATLON, ATTR_LINEWIDTH, ATTR_NAME, ATTR_PICKABLE, ATTR_POINTS, ATTR_TEXT, ATTR_TIMEFORMAT, 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, oldVisibility, 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
FrontGlyph()
          Ctor
FrontGlyph(DrawingControl control, DisplayEvent event)
          Ctor
FrontGlyph(DrawingControl control, DisplayEvent event, String type, boolean smooth)
          ctor
 
Method Summary
protected  void addAttributes(Element e)
          Populate the xml node with attrs
protected  boolean applyProperties(Hashtable compMap)
          apply props
 boolean canShowArea()
          Can we show calculated area
protected  void createDisplayable()
          create the displayable
protected  FrontDrawer doMakeFrontDrawer()
          make the frontDrawer
 void doStretch(DisplayEvent event)
          Stretch this glyph
protected  float[][] getCurve()
          get the curve data
protected  float getDefaultZPosition()
          Get the default Z position for the glyph.
 String getExtraDescription()
          get the extra description to show in gui
 boolean getFlipIt()
          Get the FlipIt property.
protected  FrontDrawer getFrontDrawer()
          get the frontDrawer
 double getFrontScale()
          Get the FrontScale property.
 String getFrontType()
          Get the FrontType property.
protected  void getPropertiesComponents(List comps, Hashtable compMap)
          get the prop gui comps
protected  List getSelectionPoints()
          Get points used to select this glyph.
 String getTagName()
          Get xml tag name to use
 String getTypeName()
          Name to use for this glyph
 DrawingGlyph handleMousePressed(DisplayEvent event)
          Handle event
protected  boolean initFinalInner()
          Init at the end
 void initFromXml(DrawingControl control, Element node)
          Initialize from xml
 void projectionChanged()
          Update location
protected  void setBaseScale(DrawingControl control, FrontDrawer frontDrawer)
          Utility
 void setFlipIt(boolean value)
          Set the FlipIt property.
 void setFrontScale(double value)
          Set the FrontScale property.
 void setFrontType(String value)
          Set the FrontType property.
protected  boolean shouldAddFrontProperties()
          should add properties for the front
protected  boolean shouldShowColorSelector()
          show the color selector in the properties dialog
 void updateLocation()
          Glyph moved.
 void viewpointChanged()
          Update location
 DrawingGlyph xxhandleMouseDragged(DisplayEvent event)
          Handle event
protected  void xxxxsetColor(Displayable displayable, Color c)
          noop
 
Methods inherited from class ucar.unidata.idv.control.drawing.PolyGlyph
canShowDistance, doDeletePoint, doFlythrough, doneBeingCreated, getClosed, getExtrude, getSmooth, handleKeyPressed, handleMouseDragged, handleMouseReleased, isValid, setClosed, setExtrude, setSmooth
 
Methods inherited from class ucar.unidata.idv.control.drawing.LineGlyph
getLineWidth, initFromUser, setLineWidth
 
Methods inherited from class ucar.unidata.idv.control.drawing.DrawingGlyph
addDisplayable, addTime, checkTimeVisibility, checkVisibility, closestPoint, constrainedTo2D, distance, distanceBetween, distanceBetween, doInterpolatedStretch, doMove, evaluateJython, getArea, getAreaString, getBeenRemoved, getBeingCreated, getBgcolor, getBoundingBox, getBoxPoint, getBoxPoint, getBoxPoint, getColor, getCoordType, getCreatedByUser, getDescription, getDisplayable, getDistance, getEditable, getElement, getFilled, getFixedAltitude, getFullLatLon, getIsRaster, getLatLons, getLatLons, getName, getParent, getPickable, getPoint, getPoints, getPointValues, getPointValues, getPointValuesDouble, getPointValuesDouble, getTimeField, getTimePropertiesComponents, getTimeValues, getVisibleFlag, getZPosition, handleCreation, handleMouseMoved, hide, initFinal, initFromBundle, initMove, initStretch, isFrontDisplay, isInFlatSpace, isInLatLonSpace, isInXYSpace, isSelectable, isVisible, makePoint, mousePressed, moveTo, processPointStrings, removeDisplayable, setActualPoints, setBeenRemoved, setBgcolor, setColor, setColor, setCoordType, setCreatedByUser, setEditable, setFilled, setFullLatLon, setName, setPickable, setPoints, setProperties, setSelected, setTimeValues, setVisible, setVisibleFlag, setZPosition, shouldShowBgColorSelector, show, smoothCurve, squared, swap, swap, toLatLonAlt, toString, tryToFill, writePoints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTR_FRONTTYPE

public static final String ATTR_FRONTTYPE
Xml attribute name

See Also:
Constant Field Values

ATTR_FRONTSCALE

public static final String ATTR_FRONTSCALE
xml attribute for the scale for the front

See Also:
Constant Field Values
Constructor Detail

FrontGlyph

public FrontGlyph()
Ctor


FrontGlyph

public FrontGlyph(DrawingControl control,
                  DisplayEvent event)
           throws VisADException,
                  RemoteException
Ctor

Parameters:
control - The control I'm in.
event - The display event.
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

FrontGlyph

public FrontGlyph(DrawingControl control,
                  DisplayEvent event,
                  String type,
                  boolean smooth)
           throws VisADException,
                  RemoteException
ctor

Parameters:
control - The control I'm in.
event - The display event.
type - Front type
smooth - is the front smooth or segmented
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen
Method Detail

getFrontDrawer

protected FrontDrawer getFrontDrawer()
get the frontDrawer

Returns:
the frontDrawer

initFinalInner

protected boolean initFinalInner()
                          throws VisADException,
                                 RemoteException
Init at the end

Overrides:
initFinalInner in class LineGlyph
Returns:
Success
Throws:
RemoteException - On badness
VisADException - On badness

doMakeFrontDrawer

protected FrontDrawer doMakeFrontDrawer()
                                 throws VisADException,
                                        RemoteException
make the frontDrawer

Returns:
the frontDrawer
Throws:
RemoteException - on badness
VisADException - on badness

xxxxsetColor

protected void xxxxsetColor(Displayable displayable,
                            Color c)
                     throws VisADException,
                            RemoteException
noop

Parameters:
displayable - displayable
c - color
Throws:
RemoteException - On badness
VisADException - On badness

doStretch

public void doStretch(DisplayEvent event)
               throws VisADException,
                      RemoteException
Stretch this glyph

Overrides:
doStretch in class PolyGlyph
Parameters:
event - The display event.
Throws:
RemoteException - On badness
VisADException - On badness

getExtraDescription

public String getExtraDescription()
get the extra description to show in gui

Overrides:
getExtraDescription in class DrawingGlyph
Returns:
description

getPropertiesComponents

protected void getPropertiesComponents(List comps,
                                       Hashtable compMap)
get the prop gui comps

Overrides:
getPropertiesComponents in class PolyGlyph
Parameters:
comps - List of comps
compMap - comp map

createDisplayable

protected void createDisplayable()
                          throws VisADException,
                                 RemoteException
create the displayable

Overrides:
createDisplayable in class LineGlyph
Throws:
RemoteException - on badness
VisADException - on badness

shouldAddFrontProperties

protected boolean shouldAddFrontProperties()
should add properties for the front

Returns:
should add properties for the front

shouldShowColorSelector

protected boolean shouldShowColorSelector()
show the color selector in the properties dialog

Overrides:
shouldShowColorSelector in class DrawingGlyph
Returns:
show the color selector in the properties dialog

applyProperties

protected boolean applyProperties(Hashtable compMap)
                           throws VisADException,
                                  RemoteException
apply props

Overrides:
applyProperties in class LineGlyph
Parameters:
compMap - holds comps
Returns:
ok
Throws:
RemoteException - On badness
VisADException - On badness

canShowArea

public boolean canShowArea()
Can we show calculated area

Overrides:
canShowArea in class PolyGlyph
Returns:
true

initFromXml

public void initFromXml(DrawingControl control,
                        Element node)
                 throws VisADException,
                        RemoteException
Initialize from xml

Overrides:
initFromXml in class PolyGlyph
Parameters:
control - The control I'm in.
node - The xml node
Throws:
RemoteException - On badness
VisADException - On badness

addAttributes

protected void addAttributes(Element e)
Populate the xml node with attrs

Overrides:
addAttributes in class PolyGlyph
Parameters:
e - Xml node

viewpointChanged

public void viewpointChanged()
                      throws VisADException,
                             RemoteException
Update location

Overrides:
viewpointChanged in class DrawingGlyph
Throws:
RemoteException - On badness
VisADException - On badness

projectionChanged

public void projectionChanged()
                       throws VisADException,
                              RemoteException
Update location

Overrides:
projectionChanged in class DrawingGlyph
Throws:
RemoteException - On badness
VisADException - On badness

setBaseScale

protected void setBaseScale(DrawingControl control,
                            FrontDrawer frontDrawer)
                     throws VisADException,
                            RemoteException
Utility

Parameters:
control - The control we're in
frontDrawer - The drawer
Throws:
RemoteException - On badness
VisADException - On badness

getSelectionPoints

protected List getSelectionPoints()
Get points used to select this glyph.

Overrides:
getSelectionPoints in class PolyGlyph
Returns:
Selection points

getDefaultZPosition

protected float getDefaultZPosition()
Get the default Z position for the glyph.

Overrides:
getDefaultZPosition in class DrawingGlyph
Returns:
where to put this glyph in Z

updateLocation

public void updateLocation()
                    throws VisADException,
                           RemoteException
Glyph moved. Update the Displayable location.

Overrides:
updateLocation in class PolyGlyph
Throws:
RemoteException - On badness
VisADException - On badness

getCurve

protected float[][] getCurve()
                      throws VisADException,
                             RemoteException
get the curve data

Returns:
curve data
Throws:
RemoteException - on badness
VisADException - on badness

handleMousePressed

public DrawingGlyph handleMousePressed(DisplayEvent event)
                                throws VisADException,
                                       RemoteException
Handle event

Overrides:
handleMousePressed in class PolyGlyph
Parameters:
event - The display event.
Returns:
This or null
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

xxhandleMouseDragged

public DrawingGlyph xxhandleMouseDragged(DisplayEvent event)
                                  throws VisADException,
                                         RemoteException
Handle event

Parameters:
event - The display event.
Returns:
This or null
Throws:
RemoteException - On badness
VisADException - On badness

getTagName

public String getTagName()
Get xml tag name to use

Overrides:
getTagName in class PolyGlyph
Returns:
Xml tag name

getTypeName

public String getTypeName()
Name to use for this glyph

Overrides:
getTypeName in class PolyGlyph
Returns:
The glyph type name

setFrontType

public void setFrontType(String value)
Set the FrontType property.

Parameters:
value - The new value for FrontType

getFrontType

public String getFrontType()
Get the FrontType property.

Returns:
The FrontType

setFlipIt

public void setFlipIt(boolean value)
Set the FlipIt property.

Parameters:
value - The new value for FlipIt

getFlipIt

public boolean getFlipIt()
Get the FlipIt property.

Returns:
The FlipIt

setFrontScale

public void setFrontScale(double value)
Set the FrontScale property.

Parameters:
value - The new value for FrontScale

getFrontScale

public double getFrontScale()
Get the FrontScale property.

Returns:
The FrontScale