org.tigris.gef.presentation
Class FigImage

java.lang.Object
  extended by org.tigris.gef.presentation.Fig
      extended by org.tigris.gef.presentation.FigImage
All Implemented Interfaces:
java.awt.image.ImageObserver, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, PopupGenerator

public class FigImage
extends Fig
implements java.awt.image.ImageObserver

Primitive Fig to paint images (such as icons) on a LayerDiagram.

See Also:
Serialized Form

Field Summary
protected  java.awt.Image _image
          The Image being rendered
protected  java.net.URL _url
          The URL of the Image being rendered
 
Fields inherited from class org.tigris.gef.presentation.Fig
_allowsSaving, _context, _dashes, _dashPeriod, _dashStyle, _filled, _h, _w, _x, _y, an, annotationOwner, annotationStatus, BORDER, MIN_SIZE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
FigImage(int x, int y, java.awt.Image i)
          Construct a new FigImage w/ the given position and image.
FigImage(int x, int y, int w, int h, java.awt.Image img)
          Construct a new FigImage with the given position, size, and Image.
FigImage(int x, int y, java.net.URL imageUrl)
          Construct a new FigImage w/ the given position and URL.
 
Method Summary
 void createDrag(int anchorX, int anchorY, int x, int y, int snapX, int snapY)
          Resize the object for drag on creation.
 java.net.URL getURL()
          USED BY SVG.tee
 boolean imageUpdate(java.awt.Image img, int infoflags, int x, int y, int w, int h)
           
 void paint(java.awt.Graphics g)
          Paint this FigImage on the given Graphics.
 void setURL(java.net.URL newURL)
           
 
Methods inherited from class org.tigris.gef.presentation.Fig
addAnnotation, addPoint, addPropertyChangeListener, align, calcBounds, center, classNameAndBounds, cleanUp, clone, connectionPoint, contains, contains, contains, countCornersContained, damage, deleteFromModel, drawDashedLine, drawDashedPerimeter, endTrans, firePropChange, firePropChange, firePropChange, getAnnotationOwner, getAnnotationStrategy, getBounds, getBounds, getClosestPoint, getContext, getDashed, getDashed01, getDashedString, getEnclosedFigs, getEnclosingFig, getFillColor, getFilled, getFilled01, getFirstPoint, getGravityPoints, getGroup, getHalfHeight, getHalfWidth, getHandleBox, getHeight, getId, getLastPoint, getLayer, getLineColor, getLineWidth, getLocation, getLocked, getMinimumSize, getNumPoints, getOwner, getPerimeterLength, getPoint, getPoints, getPopUpActions, getPreferredSize, getPrivateData, getResource, getSingle, getSize, getTipString, getTrapRect, getUseTrapRect, getVisState, getWidth, getX, getXs, getY, getYs, hasFillColor, hasLineColor, hit, initAnnotations, insertPoint, intersects, intersectsPerimeter, isAnnotation, isCopyable, isCutable, isLowerRightResizable, isMovable, isReshapable, isResizable, isRotatable, isSelected, isVisible, makeSelection, OK, pointAlongPerimeter, postLoad, postSave, preSave, print, propertyChange, redraw, removeAnnotation, removeAnnotation, removeFromDiagram, removePoint, removePropertyChangeListener, reorder, routingRect, savingAllowed, setAnnotationOwner, setAnnotationStatus, setAnnotationStrategy, setBounds, setBounds, setCenter, setContext, setDashed, setDashedString, setEnclosingFig, setFillColor, setFilled, setGroup, setHandleBox, setHeight, setLayer, setLineColor, setLineWidth, setLocation, setLocation, setLocked, setMovable, setNumPoints, setOwner, setPoint, setPoint, setPoint, setPoint, setPoints, setPrivateData, setResizable, setResource, setSavingAllowed, setSingle, setSize, setSize, setVisible, setVisState, setWidth, setX, setXs, setY, setYs, stuffBounds, stuffPointAlongPerimeter, translate, translateAnnotations, unsetAnnotationOwner, updateAnnotationPositions, updateVisState, within
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_image

protected transient java.awt.Image _image
The Image being rendered


_url

protected java.net.URL _url
The URL of the Image being rendered

Constructor Detail

FigImage

public FigImage(int x,
                int y,
                int w,
                int h,
                java.awt.Image img)
Construct a new FigImage with the given position, size, and Image.


FigImage

public FigImage(int x,
                int y,
                java.awt.Image i)
Construct a new FigImage w/ the given position and image.


FigImage

public FigImage(int x,
                int y,
                java.net.URL imageUrl)
Construct a new FigImage w/ the given position and URL.

Method Detail

createDrag

public void createDrag(int anchorX,
                       int anchorY,
                       int x,
                       int y,
                       int snapX,
                       int snapY)
Description copied from class: Fig
Resize the object for drag on creation. It bypasses the things done in resize so that the position of the object can be kept as the anchor point. Needs-More-Work: do I really need this function?

Overrides:
createDrag in class Fig
See Also:
FigLine.createDrag(int, int, int, int, int, int)

getURL

public java.net.URL getURL()
USED BY SVG.tee


imageUpdate

public boolean imageUpdate(java.awt.Image img,
                           int infoflags,
                           int x,
                           int y,
                           int w,
                           int h)
Specified by:
imageUpdate in interface java.awt.image.ImageObserver

paint

public void paint(java.awt.Graphics g)
Paint this FigImage on the given Graphics.

Overrides:
paint in class Fig

setURL

public void setURL(java.net.URL newURL)