|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pentaho.reporting.engine.classic.core.DefaultImageReference
public class 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.
| Constructor Summary | |
|---|---|
DefaultImageReference(DefaultImageReference parent)
Copies the contents of the given DefaultImageReference. |
|
DefaultImageReference(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(org.pentaho.reporting.libraries.resourceloader.Resource imageResource)
|
|
DefaultImageReference(URL url)
Deprecated. This method auto-creates a new resource-manager for each image and therefore possibly prevents effective caching. Use the Resource-accepting constructor instead. |
|
| Method Summary | |
|---|---|
Object |
clone()
Clones this Element. |
boolean |
equals(Object obj)
Checks for equality. |
Object |
getIdentity()
Returns the identity information. |
Image |
getImage()
Returns the original image if available. |
int |
getImageHeight()
Returns the (unscaled) image height. |
int |
getImageWidth()
Returns the (unscaled) image width. |
String |
getName()
Returns the name of this image reference. |
org.pentaho.reporting.libraries.resourceloader.ResourceKey |
getResourceKey()
Returns the resourcekey that was used to load the image. |
float |
getScaleX()
Returns a predefined scaling factor. |
float |
getScaleY()
Returns a predefined scaling factor. |
URL |
getSourceURL()
Returns the source URL for the image. |
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. |
String |
toString()
Returns a String representing this object. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultImageReference(URL url)
throws IOException
url - the source url. The url must be readable during the report generation.
IOException - if the url could not be read.
NullPointerException - if the given URL is null.
public DefaultImageReference(Image img)
throws IOException
img - the image for this reference.
NullPointerException - if the image is null.
IOException - if an IOError occured while loading the image.
public DefaultImageReference(org.pentaho.reporting.libraries.resourceloader.Resource imageResource)
throws org.pentaho.reporting.libraries.resourceloader.ResourceException
org.pentaho.reporting.libraries.resourceloader.ResourceException
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 Image getImage()
getImage in interface LocalImageContainerpublic URL getSourceURL()
getSourceURL in interface URLImageContainerpublic String getSourceURLString()
getSourceURLString in interface URLImageContainerpublic String toString()
toString in class Objectpublic org.pentaho.reporting.libraries.resourceloader.ResourceKey getResourceKey()
URLImageContainer
getResourceKey in interface URLImageContainerpublic boolean equals(Object obj)
equals in class Objectobj - the object to test.
public int hashCode()
hashCode in class Object
public Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException - this should never be thrown.public int getImageWidth()
getImageWidth in interface ImageContainerpublic int getImageHeight()
getImageHeight in interface ImageContainerpublic boolean isLoadable()
isLoadable in interface URLImageContainerpublic Object getIdentity()
getIdentity in interface LocalImageContainerpublic String getName()
getName in interface LocalImageContainerpublic boolean isIdentifiable()
isIdentifiable in interface LocalImageContainerpublic float getScaleX()
getScaleX in interface ImageContainerpublic float getScaleY()
getScaleY in interface ImageContainer
public void setScale(float sx,
float sy)
sx - the scale factor.sy - the scale factor.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||