|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.ImageReference
An image reference encapsulates the source of an image together with a
java.awt.Image
. The source is used to create a higher resolution
version if needed. The source file/URL may also be inlined into the output
target, to create better results.
An ImageReference is always used in conjunction with an ImageElement.
Constructor Summary | |
ImageReference(java.awt.Image img)
Creates a new ImageReference without an assigned URL for the Image. |
|
ImageReference(int w,
int h,
java.awt.geom.Rectangle2D bounds)
Creates a new image reference. |
|
ImageReference(java.net.URL url)
Creates a new ImageReference with an origin of 0,0 and the desired width. |
Method Summary | |
java.lang.Object |
clone()
Clones this Element. |
boolean |
equals(java.lang.Object o)
Checks for equality. |
java.awt.geom.Rectangle2D |
getBounds()
Return the bounds of the image contained in that reference. |
java.awt.geom.Rectangle2D |
getBoundsScaled()
Returns the scaled bounds. |
java.awt.Image |
getImage()
Returns the current image instance. |
int |
getImageHeight()
Returns the (unscaled) image height. |
int |
getImageWidth()
Returns the (unscaled) image width. |
float |
getScaleX()
Returns the x scale factor. |
float |
getScaleY()
Returns the y scale factor. |
java.net.URL |
getSourceURL()
Returns the source URL for the image. |
int |
hashCode()
compute a hashcode for this imageReference. |
void |
setBounds(java.awt.geom.Rectangle2D bounds)
Define the bounds of the image contained in that reference. |
void |
setBoundsScaled(java.awt.geom.Rectangle2D bounds)
Sets the scaled bounds. |
void |
setScaleX(float scaleX)
Sets the x scale factor. |
void |
setScaleY(float scaleY)
Sets the y scale factor. |
java.lang.String |
toString()
Returns a String representing this object. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ImageReference(java.net.URL url) throws java.io.IOException
url
- the source url. The url must be readable while generating reports.
java.io.IOException
- if the url could not be read.public ImageReference(java.awt.Image img)
img
- the image for this reference
java.lang.NullPointerException
- if the image is nullpublic ImageReference(int w, int h, java.awt.geom.Rectangle2D bounds)
w
- the width of the unscaled image.h
- the height of the unscaled image.bounds
- the area of the unscaled image to draw.Method Detail |
public java.awt.geom.Rectangle2D getBounds()
public void setBounds(java.awt.geom.Rectangle2D bounds)
bounds
- the bounds.public float getScaleX()
public void setScaleX(float scaleX)
scaleX
- the new factor.public float getScaleY()
public void setScaleY(float scaleY)
scaleY
- the y scale factor.public void setBoundsScaled(java.awt.geom.Rectangle2D bounds)
bounds
- the bounds.public java.awt.geom.Rectangle2D getBoundsScaled()
public java.awt.Image getImage()
The image is not scaled in any way.
public java.net.URL getSourceURL()
public java.lang.String toString()
public boolean equals(java.lang.Object o)
o
- the object to test.
public int hashCode()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
- this should never be thrown.public int getImageWidth()
public int getImageHeight()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |