ucar.unidata.idv.control.drawing
Class ImageGlyph

java.lang.Object
  extended by ucar.unidata.idv.control.drawing.DrawingGlyph
      extended by ucar.unidata.idv.control.drawing.ImageGlyph

public class ImageGlyph
extends DrawingGlyph

Class ImageGlyph. Displays images.

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

Field Summary
static String ATTR_IMAGE
          Xml attribute name
static String ATTR_UPDATE
          Xml attribute name
 
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
ImageGlyph()
          Ctor
ImageGlyph(DrawingControl control, DisplayEvent event, String image)
          Ctor
 
Method Summary
protected  void addAttributes(Element e)
          Populate the xml node with attrs
protected  boolean constrainedTo2D()
          Is glyph constrained to 2d
 void doExport()
          Export the image as an ximg file
 void doMove(DisplayEvent event)
          Handle the event
 void doStretch(DisplayEvent event)
          Handle the event
 String getExtraDescription()
          Get extra description for the table listing
 String getImage()
          Get the Image property.
protected  void getPropertiesComponents(List comps, Hashtable compMap)
          Get properties widgets
 String getTagName()
          Xml tag name to use
 String getTypeName()
          Name to use for this glyph
 DrawingGlyph handleCreation(DisplayEvent event)
          Was created from user
 DrawingGlyph handleMousePressed(DisplayEvent event)
          Handle event
 DrawingGlyph handleMouseReleased(DisplayEvent event)
          Handle event
protected  boolean initFinalInner()
          Do final initialization
 boolean initFromUser(DrawingControl control, DisplayEvent event)
          Initialize after the user created me
 void initFromXml(DrawingControl control, Element node)
          Initialize from xml
 void initMove(DisplayEvent event)
          Started moving
 void setImage(String value)
          Set the Image property.
 void updateLocation()
          Glyph moved.
 
Methods inherited from class ucar.unidata.idv.control.drawing.DrawingGlyph
addDisplayable, addTime, applyProperties, canShowArea, canShowDistance, checkTimeVisibility, checkVisibility, closestPoint, distance, distanceBetween, distanceBetween, doInterpolatedStretch, doneBeingCreated, evaluateJython, getArea, getBeenRemoved, getBeingCreated, getBoundingBox, getBoxPoint, getBoxPoint, getBoxPoint, getColor, getCoordType, getCreatedByUser, getDefaultZPosition, getDescription, getDisplayable, getDistance, getEditable, getElement, getFilled, getFixedAltitude, getFullLatLon, getLatLons, getName, getParent, getPickable, getPoint, getPoints, getPointValues, getPointValues, getPointValuesDouble, getPointValuesDouble, getSelectionPoints, getTimeField, getTimePropertiesComponents, getTimeValues, getVisibleFlag, getZPosition, handleKeyPressed, handleMouseDragged, handleMouseMoved, hide, initFinal, initFromBundle, initStretch, isInFlatSpace, isInLatLonSpace, isInXYSpace, isSelectable, isValid, isVisible, makePoint, mousePressed, moveTo, processPointStrings, projectionChanged, removeDisplayable, setActualPoints, setBeenRemoved, setColor, setColor, setCoordType, setCreatedByUser, setEditable, setFilled, setFullLatLon, setName, setPickable, setPoints, setProperties, setSelected, setTimeValues, setVisible, setVisibleFlag, setZPosition, shouldShowColorSelector, show, smoothCurve, squared, swap, swap, toLatLonAlt, toString, tryToFill, viewpointChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTR_IMAGE

public static final String ATTR_IMAGE
Xml attribute name

See Also:
Constant Field Values

ATTR_UPDATE

public static final String ATTR_UPDATE
Xml attribute name

See Also:
Constant Field Values
Constructor Detail

ImageGlyph

public ImageGlyph()
Ctor


ImageGlyph

public ImageGlyph(DrawingControl control,
                  DisplayEvent event,
                  String image)
           throws VisADException,
                  RemoteException
Ctor

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

initFromUser

public boolean initFromUser(DrawingControl control,
                            DisplayEvent event)
                     throws VisADException,
                            RemoteException
Initialize after the user created me

Overrides:
initFromUser in class DrawingGlyph
Parameters:
control - The control I'm in.
event - The display event.
Returns:
ok
Throws:
RemoteException - On badness
VisADException - On badness

initFromXml

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

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

getExtraDescription

public String getExtraDescription()
Get extra description for the table listing

Overrides:
getExtraDescription in class DrawingGlyph
Returns:
extra description

handleCreation

public DrawingGlyph handleCreation(DisplayEvent event)
                            throws VisADException,
                                   RemoteException
Was created from user

Overrides:
handleCreation in class DrawingGlyph
Parameters:
event - The display event.
Returns:
This or null
Throws:
RemoteException - On badness
VisADException - On badness

doMove

public void doMove(DisplayEvent event)
            throws VisADException,
                   RemoteException
Handle the event

Overrides:
doMove in class DrawingGlyph
Parameters:
event - The display event.
Throws:
RemoteException - On badness
VisADException - On badness

doStretch

public void doStretch(DisplayEvent event)
               throws VisADException,
                      RemoteException
Handle the event

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

constrainedTo2D

protected boolean constrainedTo2D()
Is glyph constrained to 2d

Overrides:
constrainedTo2D in class DrawingGlyph
Returns:
Constrained to 2d

addAttributes

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

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

getTagName

public String getTagName()
Xml tag name to use

Specified by:
getTagName in class DrawingGlyph
Returns:
Xml tag name to use

handleMouseReleased

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

Overrides:
handleMouseReleased in class DrawingGlyph
Parameters:
event - The display event.
Returns:
This or null
Throws:
RemoteException - On badness
VisADException - On badness

initMove

public void initMove(DisplayEvent event)
              throws VisADException,
                     RemoteException
Started moving

Overrides:
initMove in class DrawingGlyph
Parameters:
event - The display event.
Throws:
RemoteException - On badness
VisADException - On badness

updateLocation

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

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

handleMousePressed

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

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

initFinalInner

protected boolean initFinalInner()
                          throws VisADException,
                                 RemoteException
Do final initialization

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

getPropertiesComponents

protected void getPropertiesComponents(List comps,
                                       Hashtable compMap)
Get properties widgets

Overrides:
getPropertiesComponents in class DrawingGlyph
Parameters:
comps - widgets
compMap - extra holder of components

doExport

public void doExport()
Export the image as an ximg file


getTypeName

public String getTypeName()
Name to use for this glyph

Specified by:
getTypeName in class DrawingGlyph
Returns:
The glyph type name

setImage

public void setImage(String value)
Set the Image property.

Parameters:
value - The new value for Image

getImage

public String getImage()
Get the Image property.

Returns:
The Image