org.jfree.report
Class ImageElement

java.lang.Object
  extended byorg.jfree.report.Element
      extended byorg.jfree.report.ImageElement
All Implemented Interfaces:
java.lang.Cloneable, DataTarget, java.io.Serializable

public class ImageElement
extends Element

Used to draw images (Gif, JPEG, PNG or wmf) on a report band. PNG Support needs JDK 1.3 or higher. This class encapsulates an ImageReference into an element.

Author:
Thomas Morgner
See Also:
Serialized Form

Field Summary
static java.lang.String CONTENT_TYPE
          A string for the content type.
 
Fields inherited from class org.jfree.report.Element
ANONYMOUS_ELEMENT_PREFIX
 
Constructor Summary
ImageElement()
          Constructs a image element.
 
Method Summary
 java.lang.String getContentType()
          Returns the content type, in this case 'image/generic'.
 boolean isKeepAspectRatio()
          Returns true if the image's aspect ratio should be preserved, and false otherwise.
 boolean isScale()
          Returns true if the image should be scaled, and false otherwise.
 void setKeepAspectRatio(boolean kar)
          Sets a flag that controls whether the shape's aspect ratio should be preserved.
 void setScale(boolean scale)
          Sets a flag that controls whether the image should be scaled to fit the element bounds.
 
Methods inherited from class org.jfree.report.Element
clone, getDataSource, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getStyle, getStyleSheetCollection, getTreeLock, getValue, handleRegisterStyleSheetCollection, handleUnregisterStyleSheetCollection, isDynamicContent, isLayoutCacheable, isVisible, registerStyleSheetCollection, setDataSource, setDynamicContent, setLayoutCacheable, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setVisible, unregisterStyleSheetCollection, updateStyleSheetCollection
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_TYPE

public static final java.lang.String CONTENT_TYPE
A string for the content type.

See Also:
Constant Field Values
Constructor Detail

ImageElement

public ImageElement()
Constructs a image element.

Method Detail

getContentType

public java.lang.String getContentType()
Returns the content type, in this case 'image/generic'.

Specified by:
getContentType in class Element
Returns:
the content type.

isScale

public boolean isScale()
Returns true if the image should be scaled, and false otherwise.

Returns:
true or false.

setScale

public void setScale(boolean scale)
Sets a flag that controls whether the image should be scaled to fit the element bounds.

Parameters:
scale - the flag.

isKeepAspectRatio

public boolean isKeepAspectRatio()
Returns true if the image's aspect ratio should be preserved, and false otherwise.

Returns:
true or false.

setKeepAspectRatio

public void setKeepAspectRatio(boolean kar)
Sets a flag that controls whether the shape's aspect ratio should be preserved.

Parameters:
kar - the flag.