|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.inet.html.image.RemoteImage
public class RemoteImage
This class proxies an image which is about to be loaded by the ImageFetcher
Field Summary | |
---|---|
static int |
STATUS_FINISHED
|
static int |
STATUS_INVALID
|
static int |
STATUS_LOADING
|
static int |
STATUS_NEW
|
Constructor Summary | |
---|---|
RemoteImage(java.awt.Image content)
Creates the image. |
|
RemoteImage(java.net.URL location)
Creates the image. |
Method Summary | |
---|---|
void |
addObserver(java.awt.image.ImageObserver observer)
Adds an ImageObserver |
java.awt.Image |
getContent()
Returns the content of the proxy. |
int |
getHeight()
Returns the height of the image, may be 0 as long as the image was not loaded |
java.net.URL |
getLocation()
Returns the location URL of this image |
int |
getStatus()
Returns the current loading status of the image |
int |
getWidth()
Returns the width of the image, may be 0 as long as the image was not loaded |
void |
imageUpdate(int infoflags,
int x,
int y,
int width,
int height)
Notifies all registered image observers |
void |
removeObserver(java.awt.image.ImageObserver observer)
Removes an image observer |
void |
setContent(java.awt.Image content)
Sets the content of the proxy. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int STATUS_NEW
public static final int STATUS_LOADING
public static final int STATUS_FINISHED
public static final int STATUS_INVALID
Constructor Detail |
---|
public RemoteImage(java.net.URL location)
ImageFetcher
to get images
of this type
location
- the location to load the image frompublic RemoteImage(java.awt.Image content)
content
- the image content to displayMethod Detail |
---|
public java.net.URL getLocation()
URL
of this image
URL
of this image, not nullpublic int getHeight()
public int getWidth()
public void addObserver(java.awt.image.ImageObserver observer)
ImageObserver
observer
- the observer to addpublic void removeObserver(java.awt.image.ImageObserver observer)
observer
- the observer to removepublic void imageUpdate(int infoflags, int x, int y, int width, int height)
infoflags
- the bitwise inclusive OR of the following
flags: WIDTH
, HEIGHT
,
PROPERTIES
, SOMEBITS
,
FRAMEBITS
, ALLBITS
,
ERROR
, ABORT
.x
- the x coordinate.y
- the y coordinate.width
- the width.height
- the height.ImageObserver
public int getStatus()
STATUS_NEW
,
STATUS_LOADING
,
STATUS_FINISHED
,
STATUS_INVALID
public void setContent(java.awt.Image content)
content
- the content of the proxypublic java.awt.Image getContent()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |