Class browser.WRImageItem
All Packages This Package Previous Next
Class browser.WRImageItem
java.lang.Object
|
+----browser.Observable
|
+----awt.DisplayItem
|
+----awt.ImageDisplayItem
|
+----browser.WRImageItem
-
public class
WRImageItem
-
extends ImageDisplayItem
-
implements Alignable, Observer
Class WRImageItem is the display item for all images that appear
in HotJava documents. It handles alignment queries, delayed
image loading, image caching and following hypertext links if the
image is part of an anchor.
Instances of this class are observers of instances of
ImageHandle. That way this display item will get notified
when the ImageHandle finishes reading an image across the net.
-
Version:
-
1.62, 26 Apr 1995
-
Author:
-
Jonathan Payne,
Chris Warth
-
anchorUrl
-
-
borderThickness
-
-
imageDelayedImage
-
"Image Delayed" icon.
-
imageFailedImage
-
"Image Failed" icon.
-
imageLoadingImage
-
"Image Loading" icon.
-
imageRefDelayedImage
-
"Image Ref Delayed" icon.
-
imageRefFailedImage
-
"Image Ref Failed" icon.
-
imageUrl
-
-
imgTag
-
-
ismap
-
-
paintImage
-
-
tagHeight
-
-
tagWidth
-
-
WRImageItem(WRWindow, TagRef, String)
-
Creates a new WRImageItem in the specified WRWindow.
-
checkImage(Window)
-
-
convertAlign(String)
-
-
deactivate()
-
-
executeClick(Event)
-
-
getAlign()
-
Get alignment for formatting.
-
getImageUrl(URL, WRWindow, TagRef)
-
-
initializeBorderThickness()
-
-
kickImage(WRWindow, ImgTagRef)
-
-
nuke()
-
-
paint(Window, int, int)
-
-
resizeFromImage(Image)
-
-
resizeFromImageSize(int, int)
-
-
setAnchor(String)
-
-
setColor(Color)
-
-
setImage(Image)
-
-
trackEnter(Event)
-
-
trackExit(Event)
-
-
trackMotion(Event)
-
-
trackStart(Event)
-
-
trackStop(Event)
-
-
update(Window, int, int)
-
Update is called when the mouse is clicked over an image.
-
update(Observable)
-
-
waitForImage()
-
-
waitForImageSize()
-
imageDelayedImage
public static Image imageDelayedImage
-
"Image Delayed" icon.
imageFailedImage
public static Image imageFailedImage
-
"Image Failed" icon.
imageLoadingImage
public static Image imageLoadingImage
-
"Image Loading" icon.
imageRefDelayedImage
public static Image imageRefDelayedImage
-
"Image Ref Delayed" icon.
imageRefFailedImage
public static Image imageRefFailedImage
-
"Image Ref Failed" icon.
paintImage
protected boolean paintImage
imgTag
protected TagRef imgTag
imageUrl
protected URL imageUrl
anchorUrl
protected URL anchorUrl
ismap
protected boolean ismap
borderThickness
protected byte borderThickness
tagWidth
protected int tagWidth
tagHeight
protected int tagHeight
WRImageItem
public WRImageItem(WRWindow w,
TagRef imgTag,
String href)
-
Creates a new WRImageItem in the specified WRWindow. The
image source is retrieved from the specified TagRef which
must contain a "src" attribute. If this image contains a
reference to another URL, then that is specified by the href
argument.
convertAlign
public static int convertAlign(String align)
nuke
public void nuke()
checkImage
public void checkImage(Window w)
getImageUrl
public static URL getImageUrl(URL context,
WRWindow w,
TagRef ref)
kickImage
public static void kickImage(WRWindow w,
ImgTagRef ref)
setAnchor
public void setAnchor(String href)
getAlign
public int getAlign()
-
Get alignment for formatting.
initializeBorderThickness
protected void initializeBorderThickness()
resizeFromImage
public void resizeFromImage(Image img)
resizeFromImageSize
public void resizeFromImageSize(int w,
int h)
paint
public synchronized void paint(Window w,
int x,
int y)
update
public synchronized void update(Window w,
int x,
int y)
-
Update is called when the mouse is clicked over an image.
When that occurs, we just repaint the border, if we have
one.
-
Overrides:
-
update in class DisplayItem
trackEnter
public void trackEnter(Event e)
trackMotion
public void trackMotion(Event e)
trackExit
public void trackExit(Event e)
setColor
public void setColor(Color c)
trackStart
public void trackStart(Event e)
trackStop
public void trackStop(Event e)
executeClick
protected void executeClick(Event e)
update
public synchronized void update(Observable o)
deactivate
public void deactivate()
waitForImageSize
public synchronized void waitForImageSize()
waitForImage
public synchronized void waitForImage()
setImage
public synchronized void setImage(Image i)
All Packages This Package Previous Next