org.jfree.report.elementfactory
Class StaticImageElementFactory

java.lang.Object
  extended byorg.jfree.report.elementfactory.ElementFactory
      extended byorg.jfree.report.elementfactory.ImageElementFactory
          extended byorg.jfree.report.elementfactory.StaticImageElementFactory

public class StaticImageElementFactory
extends ImageElementFactory

A factory to create static image elements. These element contain an immutable image. The image should not be modified.

Author:
Thomas Morgner

Constructor Summary
StaticImageElementFactory()
          Default Constructor.
 
Method Summary
 Element createElement()
          Creates the image element.
 java.awt.Image getImage()
          Returns the AWT-image contained in the image reference.
 ImageReference getImageReference()
          Returns the image reference instance of the element.
 void setImage(java.awt.Image image)
          Defines the image as AWT image.
 void setImageReference(ImageReference imageReference)
          Defines the image reference instance of the element.
 
Methods inherited from class org.jfree.report.elementfactory.ImageElementFactory
applyStyle, getKeepAspectRatio, getScale, setKeepAspectRatio, setScale
 
Methods inherited from class org.jfree.report.elementfactory.ElementFactory
applyElementName, getAbsolutePosition, getDynamicHeight, getMaximumSize, getMinimumSize, getName, getPreferredSize, setAbsolutePosition, setDynamicHeight, setMaximumSize, setMinimumSize, setName, setPreferredSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticImageElementFactory

public StaticImageElementFactory()
Default Constructor.

Method Detail

getImageReference

public ImageReference getImageReference()
Returns the image reference instance of the element.

Returns:
the image reference containing the image data.

setImageReference

public void setImageReference(ImageReference imageReference)
Defines the image reference instance of the element.

Parameters:
imageReference - the image reference containing the image data.

getImage

public java.awt.Image getImage()
Returns the AWT-image contained in the image reference.

Returns:
the AWT image.

setImage

public void setImage(java.awt.Image image)
Defines the image as AWT image. This produces an on-the-fly loaded image.

Parameters:
image - the new image.

createElement

public Element createElement()
Creates the image element.

Specified by:
createElement in class ElementFactory
Returns:
the generated image element.
Throws:
java.lang.IllegalStateException - if the image is not defined.
See Also:
ElementFactory.createElement()