UC Berkeley Group for User Interface Research
Updated November 17, 2000

edu.berkeley.guir.lib.satin.objects
Class GObImage

java.lang.Object
  |
  +--edu.berkeley.guir.lib.satin.objects.GraphicalObjectImpl
        |
        +--edu.berkeley.guir.lib.satin.objects.GObImage
All Implemented Interfaces:
Cloneable, EventListener, GraphicalObject, ImageObserver, SatinConstants, Serializable, Shape, StrokeListener, Watchable

public class GObImage
extends GraphicalObjectImpl
implements ImageObserver

A GraphicalObject holding an image.

This software is distributed under the Berkeley Software License.

 Revisions:  - SATIN-v1.0-1.0.0, Jun 20 1999, JH
               Created class
             - SATIN-v2.1-1.0.0, Aug 11 2000, JH
               Touched for SATIN release
             - SATIN-v2.1-1.1.0, Nov 10 2000, JH
               Fixed image loading race conditions.
               Added optional borders to the image.
 

Since:
JDK 1.2
Version:
SATIN-v2.1-1.0.0, Aug 11 2000
Author:
Jason Hong ( jasonh@cs.berkeley.edu )
See Also:
Serialized Form

Inner classes inherited from class edu.berkeley.guir.lib.satin.SatinConstants
SatinConstants.ObjectPoolAffineTransform, SatinConstants.ObjectPoolPoint2D, SatinConstants.ObjectPoolPolygon2D, SatinConstants.ObjectPoolRectangle2D, SatinConstants.ObjectPoolStringBuffer, SatinConstants.UniqueAffineTransform, SatinConstants.UniquePoint2D, SatinConstants.UniquePolygon2D, SatinConstants.UniqueRectangle2D
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Fields inherited from interface edu.berkeley.guir.lib.satin.objects.GraphicalObject
GESTUREINTRP_CLPROPERTY, INKINTRP_CLPROPERTY, STYLE_CLPROPERTY, VIEW_CLPROPERTY
 
Fields inherited from interface edu.berkeley.guir.lib.satin.SatinConstants
ABOVE, ALL, BAR, BELOW, clipboard, clprops, cmdqueue, cmdsubsys, CONTAINEDBY, CONTAINS, COORD_ABS, COORD_LOCAL, COORD_REL, DAMAGE_LATER, DAMAGE_NOW, DEBUG_GRAPHICS_OFFSET, DEBUG_STYLE_FILE, DEBUG_STYLE_GPROPERTY, DEEP, DEFAULT_POINT2D_POOL_SIZE, DEFAULT_POLYGON2D_POOL_SIZE, DEFAULT_RECTANGLE_POOL_SIZE, DEFAULT_REPAINT_THRESHOLD, DEFAULT_SELECT_THRESHOLD, DEFAULT_STRINGBUFFER_POOL_SIZE, DEFAULT_TRANSFORM_POOL_SIZE, DIR_CENTER, DIR_DOWN, DIR_DOWN_LEFT, DIR_DOWN_RIGHT, DIR_LEFT, DIR_RIGHT, DIR_UP, DIR_UP_LEFT, DIR_UP_RIGHT, FILTER_THRESHOLD, FIRST, FLOATING_PT_TOLERANCE, glprops, INTERSECTS, KEY_STYLE_DASHARRAY, KEY_STYLE_DASHPHASE, KEY_STYLE_DRAWCOLOR, KEY_STYLE_DRAWFONT, KEY_STYLE_DRAWTRANSPARENCY, KEY_STYLE_ENDCAP, KEY_STYLE_FILLCOLOR, KEY_STYLE_FILLTRANSPARENCY, KEY_STYLE_LINEJOIN, KEY_STYLE_LINEWIDTH, KEY_STYLE_MITERLIMIT, NEAR, NOTIFY_BOUNDS, NOTIFY_LAYER, NOTIFY_LOCATION, NOTIFY_STYLE, NOTIFY_TRANSFORM, poolPoints, poolPolys, poolRects, poolStrbuf, poolTx, rand, SATIN_DATA_DIRECTORY_DEFAULT, SATIN_DATA_DIRECTORY_GPROPERTY, SATIN_PROPERTIES_FILENAME, SHALLOW
 
Constructor Summary
protected GObImage()
          Create an empty image GraphicalObject.
  GObImage(Image img)
          Create a GraphicalObject around the image specified.
  GObImage(String strFileName)
          Create a GraphicalObject of the image given the specified filename.
  GObImage(URL url)
          Create a GraphicalObject of the image given the specified url.
 
Method Summary
 Object clone()
          My clone sleeps alone...
 GObImage clone(GObImage gobClone)
           
 Object deepClone()
          If you do not override this method, it calls clone() by default.
 GObImage deepClone(GObImage gobClone)
           
protected  void defaultRender(SatinGraphics g)
          The default method for rendering.
 boolean getDrawBorder()
           
 boolean imageUpdate(Image img, int infoFlags, int x, int y, int width, int height)
          Updated info on the friendly image file we contain.
 void setDrawBorder(boolean flag)
          Set whether a border should be drawn around this iamge.
 
Methods inherited from class edu.berkeley.guir.lib.satin.objects.GraphicalObjectImpl
addIndexedProperty, addWatcher, applyTransform, bringDownALayer, bringDownNLayers, bringToBottomLayer, bringToTopLayer, bringUpALayer, bringUpNLayers, clearIndexedProperty, clearWatchers, clone, contains, contains, contains, contains, countWatchers, createNewInteractionHandler, createNewViewHandler, damage, damage, damage, damage, deepClone, delete, disableDamage, disableNotify, enableDamage, enableNotify, equals, getAbsoluteLayer, getBoundingPoints2D, getBoundingPoints2D, getBoundingPoints2DRef, getBounds, getBounds2D, getBounds2D, getBounds2D, getClassDebugProperty, getClassProperty, getClassPropertyGestureInterpreter, getClassPropertyInkInterpreter, getClassPropertyStyle, getClassPropertyView, getGestureInterpreter, getHeight2D, getIndexedProperty, getIndexedProperty, getInkInterpreter, getInteractionHandler, getInverseTransform, getInverseTransform, getLocalBoundingPoints2DRef, getLocation2D, getLocation2D, getParentGroup, getPathIterator, getPathIterator, getPresentationName, getProperty, getPropertyNames, getRelativeLayer, getSheet, getStyle, getStyleRef, getTransform, getTransform, getTransformRef, getUniqueID, getView, getViewHandler, getWidth2D, handleNewStroke, handleSingleStroke, handleUpdateStroke, hasClosedBoundingPoints, hasDamageEnabled, hasNotifyEnabled, intersects, intersects, isClippedToBounds, isDirty, isSelectable, isVisible, minDistance, minDistance, minLocalDistance, moveBy, moveBy, moveTo, moveTo, notifyWatchers, notifyWatchers, notifyWatchersDelete, notifyWatchersUpdate, notifyWatchersUpdate, onNewStroke, onSingleStroke, onUpdateStroke, postProcessNewStroke, postProcessSingleStroke, postProcessUpdateStroke, preProcessNewStroke, preProcessSingleStroke, preProcessUpdateStroke, redispatchNewStroke, redispatchSingleStroke, redispatchUpdateStroke, removeIndexedProperty, removeIndexedProperty, removeProperty, removeWatcher, render, renderAllCoordBounds, renderBoundingBox, renderDebug, renderDimensions, renderSelected, renderSelectionHandle, setBoundingPoints2D, setClassDebugProperty, setClassProperty, setClassPropertyGestureInterpreter, setClassPropertyInkInterpreter, setClassPropertyStyle, setClassPropertyView, setClipToBounds, setDirty, setGestureInterpreter, setHasClosedBoundingPoints, setIndexedProperty, setInkInterpreter, setInteractionHandler, setLocalBoundingPoints2DRef, setParentGroup, setProperty, setRelativeLayer, setSelectable, setStyle, setTransform, setTransformInternal, setUniqueID, setView, setViewHandler, setVisible, shapeContains, shapeContains, shapeContains, shapeContains, shapeContainsInternal, shapeContainsInternal, shapeIntersects, shapeIntersects, shapeIntersectsInternal, toDebugString, toString, updateBoundingPoints
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GObImage

protected GObImage()
Create an empty image GraphicalObject.

GObImage

public GObImage(Image img)
Create a GraphicalObject around the image specified.
Parameters:
img - is a reference to the Image object to display.

GObImage

public GObImage(String strFileName)
Create a GraphicalObject of the image given the specified filename.
Parameters:
strFileName - is the name of the image file to load. It can load up whatever files Java can, so as of JDK1.3 this includes GIF, JPG, and PNG.

GObImage

public GObImage(URL url)
Create a GraphicalObject of the image given the specified url.
Parameters:
url - is the URL object to load up. It can load up whatever files Java can, so as of JDK1.3 this includes GIF, JPG, and PNG.
Method Detail

imageUpdate

public boolean imageUpdate(Image img,
                           int infoFlags,
                           int x,
                           int y,
                           int width,
                           int height)
Updated info on the friendly image file we contain.
Specified by:
imageUpdate in interface ImageObserver

setDrawBorder

public void setDrawBorder(boolean flag)
Set whether a border should be drawn around this iamge.

getDrawBorder

public boolean getDrawBorder()

defaultRender

protected void defaultRender(SatinGraphics g)
Description copied from class: GraphicalObjectImpl
The default method for rendering. This method is used by the DefaultView to render. Override this method in subclasses.
Overrides:
defaultRender in class GraphicalObjectImpl

clone

public Object clone()
Description copied from class: GraphicalObjectImpl
My clone sleeps alone...
Overrides:
clone in class GraphicalObjectImpl

clone

public GObImage clone(GObImage gobClone)

deepClone

public Object deepClone()
Description copied from class: GraphicalObjectImpl
If you do not override this method, it calls clone() by default.
Overrides:
deepClone in class GraphicalObjectImpl

deepClone

public GObImage deepClone(GObImage gobClone)

Copyright Information