|
||||||||||
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 LocalImageContainer
public URL getSourceURL()
getSourceURL
in interface URLImageContainer
public String getSourceURLString()
getSourceURLString
in interface URLImageContainer
public String toString()
toString
in class Object
public org.pentaho.reporting.libraries.resourceloader.ResourceKey getResourceKey()
URLImageContainer
getResourceKey
in interface URLImageContainer
public boolean equals(Object obj)
equals
in class Object
obj
- the object to test.
public int hashCode()
hashCode
in class Object
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- this should never be thrown.public int getImageWidth()
getImageWidth
in interface ImageContainer
public int getImageHeight()
getImageHeight
in interface ImageContainer
public boolean isLoadable()
isLoadable
in interface URLImageContainer
public Object getIdentity()
getIdentity
in interface LocalImageContainer
public String getName()
getName
in interface LocalImageContainer
public boolean isIdentifiable()
isIdentifiable
in interface LocalImageContainer
public float getScaleX()
getScaleX
in interface ImageContainer
public 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 |