|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--edu.umd.cs.jazz.scenegraph.ZVisualComponent
|
+--edu.umd.cs.jazz.component.ZImage
ZImage is a graphic object that represents a raster image
| Field Summary | |
protected java.lang.String |
fileName
|
protected int |
height
|
protected java.awt.Image |
image
|
protected edu.umd.cs.jazz.component.ZImageObserver |
observer
|
protected java.awt.geom.Rectangle2D |
rect
|
protected static java.awt.Component |
staticComponent
|
protected java.net.URL |
url
|
protected int |
width
|
protected boolean |
writeEmbeddedImage
|
static boolean |
writeEmbeddedImage_DEFAULT
|
| Fields inherited from class edu.umd.cs.jazz.scenegraph.ZVisualComponent |
cacheVolatile,
findable,
findable_DEFAULT,
isVolatile,
localBounds,
localBoundsDirty,
parent,
pickable,
pickable_DEFAULT,
selected |
| Constructor Summary | |
ZImage()
Constructs a new Image. |
|
ZImage(byte[] bytes)
|
|
ZImage(java.awt.Image i)
|
|
ZImage(java.lang.String aFileName)
|
|
ZImage(java.net.URL aUrl)
|
|
ZImage(ZImage zi)
Constructs a new ZImage that is a duplicate of the reference zimage, i.e., a "copy constructor" |
|
| Method Summary | |
java.lang.Object |
clone()
Duplicates the current ZImage by using the copy constructor. |
protected void |
computeLocalBounds()
Notifies this object that it has changed and that it should update its notion of its bounding box. |
java.lang.String |
getFileName()
|
int |
getHeight()
Return height of image. |
java.awt.Image |
getImage()
Return the AWT image associated with this image object. |
java.net.URL |
getUrl()
|
int |
getWidth()
Return width of image. |
boolean |
getWriteEmbeddedImage()
Determine if this image gets saved by writing the binary image into the file. |
boolean |
isLoaded()
|
protected void |
loadImage(java.awt.Image im)
|
void |
paint(ZRenderContext renderContext)
Paints this object. |
void |
setFileName(java.lang.String aFileName)
|
boolean |
setImage(byte[] bytes)
|
boolean |
setImage(java.awt.Image i)
|
boolean |
setImage(java.lang.String aFileName)
|
boolean |
setImage(java.net.URL aUrl)
|
protected void |
setLoaded(boolean l)
Called when the image has been loaded. |
void |
setState(java.lang.String fieldType,
java.lang.String fieldName,
java.lang.Object fieldValue)
Set some state of this object as it gets read back in. |
void |
setUrl(java.net.URL aUrl)
|
void |
setWriteEmbeddedImage(boolean value)
Specify if this image gets saved by writing the binary image into the file, or if it instead writes the filename of the image, and thus requires that the external image file exists in the same place to reload. |
java.lang.String |
toString()
Generate a string that represents this object for debugging. |
void |
writeObject(ZObjectOutputStream out)
Write out all of this object's state. |
| Methods inherited from class edu.umd.cs.jazz.scenegraph.ZVisualComponent |
damage,
damage,
findNode,
findVisualComponent,
getLocalBounds,
getParent,
isFindable,
isPickable,
isSelected,
isVolatile,
pick,
pickBounds,
select,
select,
setFindable,
setParent,
setPickable,
setSelected,
setVisualComponent,
setVolatile,
unselect,
updateBounds,
updateChildBounds,
updateLocalBounds,
updateVolatility,
writeObjectRecurse |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final boolean writeEmbeddedImage_DEFAULT
protected static final java.awt.Component staticComponent
protected int width
protected int height
protected java.awt.Image image
protected java.awt.geom.Rectangle2D rect
protected edu.umd.cs.jazz.component.ZImageObserver observer
protected boolean writeEmbeddedImage
protected java.lang.String fileName
protected java.net.URL url
| Constructor Detail |
public ZImage()
public ZImage(java.awt.Image i)
public ZImage(ZImage zi)
zi - Reference zimagepublic ZImage(java.lang.String aFileName)
public ZImage(java.net.URL aUrl)
public ZImage(byte[] bytes)
| Method Detail |
public java.lang.Object clone()
ZImage(ZImage)public boolean setImage(java.awt.Image i)
public boolean setImage(byte[] bytes)
public boolean setImage(java.lang.String aFileName)
public boolean setImage(java.net.URL aUrl)
protected void loadImage(java.awt.Image im)
public java.awt.Image getImage()
public void setFileName(java.lang.String aFileName)
public java.lang.String getFileName()
public void setUrl(java.net.URL aUrl)
public java.net.URL getUrl()
public void setWriteEmbeddedImage(boolean value)
value - true to embed image in file, and false to store a linkpublic boolean getWriteEmbeddedImage()
protected void computeLocalBounds()
updateBounds when needed.ZNode.getGlobalBounds()public void paint(ZRenderContext renderContext)
g2 - The graphics context to paint into.public int getWidth()
public int getHeight()
public boolean isLoaded()
protected void setLoaded(boolean l)
public java.lang.String toString()
public void writeObject(ZObjectOutputStream out)
throws java.io.IOException
out - The stream that this object writes into
public void setState(java.lang.String fieldType,
java.lang.String fieldName,
java.lang.Object fieldValue)
fieldType - The fully qualified type of the fieldfieldName - The name of the fieldfieldValue - The value of the field
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||