|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.havi.ui.HBackgroundImage
public class HBackgroundImage
This class represents a background image. Images of this class can be used as full screen backgrounds outside the java.awt framework.
Parameter | Description | Default value | Set method | Get method |
---|---|---|---|---|
None. |
Description | Default value | Set method | Get method |
---|---|---|---|
None. |
Constructor Summary | |
---|---|
HBackgroundImage(byte[] pixels)
Create an HBackgroundImage object from an array of bytes encoded in the same encoding format as when reading this type of image data from a file. |
|
HBackgroundImage(java.lang.String filename)
Create an HBackgroundImage object. |
|
HBackgroundImage(java.net.URL contents)
Create an HBackgroundImage object. |
Method Summary | |
---|---|
void |
flush()
Flush all the resources used by this image. |
int |
getHeight()
Determines the height of the image. |
int |
getWidth()
Determines the width of the image. |
void |
load(HBackgroundImageListener l)
Load the data for this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HBackgroundImage(java.lang.String filename)
filename
- the name of the file to use as the source of
data in a platform-specific URL format.public HBackgroundImage(byte[] pixels)
If this constructor succeeds then the object will automatically
be in the loaded state and calling the load(org.havi.ui.event.HBackgroundImageListener)
method shall
immediately generate an HBackgroundImageEvent
reporting success.
If the byte array does not contain a valid image then this
constructor may throw a
java.lang.IllegalArgumentException
.
Calling the flush()
method on an object built with this constructor shall have no
effect.
pixels
- the data for the HBackgroundImage object encoded
in the specified format for image files of this type.public HBackgroundImage(java.net.URL contents)
contents
- a URL referring to the data to load.Method Detail |
---|
public void load(HBackgroundImageListener l)
Multiple calls to load
shall each add an extra
listener, all of which are informed when the loading is
completed. If load is called with the same listener more than
once, the listener shall then receive multiple copies of a single
event.
l
- the listener to call when loading of data is
completed.HBackgroundImageEvent
public int getHeight()
The image must have been successfully loaded to completion before this information is guaranteed to be available. It is implementation specific whether this information is available before the image is successfully loaded to completion. An image whose loading failed for any reason shall be considered as having this information unavailable.
public int getWidth()
The image must have been successfully loaded to completion before this information is guaranteed to be available. It is implementation specific whether this information is available before the image is successfully loaded to completion. An image whose loading failed for any reason shall be considered as having this information unavailable.
public void flush()
HBackgroundDevice
are not
released.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |