|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.jfree.report.DefaultImageReference
An DefaultImageReference 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.
The given image might specify a fixed scale factor for the given image. The scaling will be applied before any layout computations will be performed.
| Constructor Summary | |
DefaultImageReference(DefaultImageReference parent)
Copies the contents of the given DefaultImageReference. |
|
DefaultImageReference(java.awt.Image img)
Creates a new ImageReference without an assigned URL for the Image. |
|
DefaultImageReference(int w,
int h)
Creates a new image reference without assigning either an Image or an URL. |
|
DefaultImageReference(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.lang.Object |
getIdentity()
Returns the identity information. |
java.awt.Image |
getImage()
Returns the original image if available. |
int |
getImageHeight()
Returns the (unscaled) image height. |
int |
getImageWidth()
Returns the (unscaled) image width. |
java.lang.String |
getName()
Returns the name of this image reference. |
float |
getScaleX()
Returns a predefined scaling factor. |
float |
getScaleY()
Returns a predefined scaling factor. |
java.net.URL |
getSourceURL()
Returns the source URL for the image. |
java.lang.String |
getSourceURLString()
Returns the a string version of the source URL. |
int |
hashCode()
Compute a hashcode for this imageReference. |
boolean |
isIdentifiable()
Checks, whether this image has a assigned identity. |
boolean |
isLoadable()
Checks, whether this image reference is loadable. |
void |
setScale(float sx,
float sy)
Defines a predefined scaling 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 DefaultImageReference(java.net.URL url)
throws java.io.IOException
url - the source url. The url must be readable during the report generation.
public DefaultImageReference(java.awt.Image img)
throws java.io.IOException
img - the image for this reference.
public DefaultImageReference(int w,
int h)
w - the width of the unscaled image.h - the height of the unscaled image.public DefaultImageReference(DefaultImageReference parent)
parent - the parent.| Method Detail |
public java.awt.Image getImage()
public java.net.URL getSourceURL()
public java.lang.String getSourceURLString()
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
public int getImageWidth()
public int getImageHeight()
public boolean isLoadable()
public java.lang.Object getIdentity()
public java.lang.String getName()
public boolean isIdentifiable()
public float getScaleX()
public float getScaleY()
public void setScale(float sx,
float sy)
If your image has a higher resolution than 72dpi, this factor should be a value lower than 1 (the image will be scaled down).
sx - the scale factor.sy - the scale factor.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||