org.jfree.report
Class ImageElement

java.lang.Object
  |
  +--org.jfree.report.Element
        |
        +--org.jfree.report.ImageElement

public class ImageElement
extends Element

Used to draw images. References to the Images must be given as ImageContainer. If you use the ImageElementFactory implementations, the necessary wrapping is done for you, if needed.

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, connectDataSource, createGlobalDefaultStyle, disconnectDataSource, getDataSource, getHRefTarget, getMaximumSize, getMinimumSize, getName, getObjectID, getParent, getPreferredSize, getReportDefinition, getStyle, getTreeLock, getValue, isDynamicContent, isLayoutCacheable, isVisible, setDataSource, setDynamicContent, setHRefTarget, setLayoutCacheable, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setReportDefinition, setVisible
 
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.
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'.
Overrides:
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.