public class VImage extends VObject
VImage class implements a visual image. This class
provides the interface of the visual object to the image object.| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected java.lang.String |
filename
The file name the image is created from.
|
protected java.awt.Image |
image
The image.
|
protected byte[] |
imagedata
The byte data the image is created from.
|
protected static boolean |
SERIALIZE_FILE_AS_BYTE
If true, serializes the image created from the file name
as the image created form the bute data.
|
protected java.net.URL |
url
The url the image is created from.
|
| コンストラクタと説明 |
|---|
VImage(byte[] imagedata)
Constructs a visual image from the specified byte data.
|
VImage(java.awt.Image image)
Constructs a visual image with the specified image.
|
VImage(java.awt.Image image,
boolean wait)
Constructs a visual image with the specified image.
|
VImage(java.awt.Image image,
java.net.URL url)
Constructs a visual image with the specified image that is
created from the specified url.
|
VImage(java.lang.String filename)
Constructs a visual image from the specified file name.
|
VImage(java.net.URL url)
Constructs a visual image from the specified url.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
java.lang.Object |
clone()
Returns a clone of this visual image.
|
java.lang.String |
getFilename()
Returns the file name the image is created from.
|
java.awt.Image |
getImage()
Returns the image in this visual image.
|
java.net.URL |
getURL()
Returns the url the image is created from.
|
boolean |
isResizable()
Checks if the visual image is resizable.
|
protected void |
loadImage(java.awt.Image image)
Loads the image and sets the width and height of this visual image.
|
protected void |
loadImage(java.awt.Image image,
boolean wait)
Loads the image and sets the width and height of this visual image.
|
void |
paint(java.awt.Graphics g,
java.awt.Point p)
Paints the visual image at the specified location.
|
void |
setSize(java.awt.Dimension d)
Resizes the visual image to the specified dimension.
|
protected void |
waitForImage()
Waits the image to be loaded.
|
protected transient java.awt.Image image
protected java.lang.String filename
protected java.net.URL url
protected byte[] imagedata
protected static final boolean SERIALIZE_FILE_AS_BYTE
public VImage(java.awt.Image image)
image - the image.public VImage(java.awt.Image image,
boolean wait)
image - the image.wait - if true, waits the image to be loaded.public VImage(java.lang.String filename)
filename - the file name.public VImage(java.net.URL url)
url - the url.public VImage(java.awt.Image image,
java.net.URL url)
image - the image.url - the url of the image.public VImage(byte[] imagedata)
imagedata - the byte data.public java.awt.Image getImage()
public java.lang.String getFilename()
public java.net.URL getURL()
public void setSize(java.awt.Dimension d)
setSize インタフェース内 VisualizablesetSize クラス内 VObjectd - the visual object dimension.Visualizable.setSize(java.awt.Dimension)public boolean isResizable()
isResizable インタフェース内 VisualizableisResizable クラス内 VObjecttrue.Visualizable.isResizable()public void paint(java.awt.Graphics g,
java.awt.Point p)
paint インタフェース内 Visualizablepaint クラス内 VObjectg - the specified graphics.p - the location in the graphics to be painted.Visualizable.paint(java.awt.Graphics, java.awt.Point)public java.lang.Object clone()
clone インタフェース内 Visualizableclone クラス内 VObjectprotected void loadImage(java.awt.Image image)
protected void loadImage(java.awt.Image image,
boolean wait)
wait - if true, waits the image to be loaded.protected void waitForImage()