org.jfree.report.elementfactory
Class ImageElementFactory

java.lang.Object
  extended byorg.jfree.report.elementfactory.ElementFactory
      extended byorg.jfree.report.elementfactory.ImageElementFactory
Direct Known Subclasses:
ImageFieldElementFactory, ImageURLFieldElementFactory, StaticImageElementFactory, StaticImageURLElementFactory

public abstract class ImageElementFactory
extends ElementFactory

An ElementFactory that can be used to create ImageElements. This is the base class for all image element factories.

Author:
Thomas Morgner

Constructor Summary
ImageElementFactory()
          DefaultConstructor.
 
Method Summary
protected  void applyStyle(ElementStyleSheet style)
          Applies the style definition to the elements stylesheet.
 java.lang.Boolean getKeepAspectRatio()
          Returns whether the generated image element should preserve the original aspect ratio of the image content during scaling.
 java.lang.Boolean getScale()
          Returns, whether the image content should be scaled to fit the complete image element bounds.
 void setKeepAspectRatio(java.lang.Boolean keepAspectRatio)
          Defines whether the generated image element should preserve the original aspect ratio of the image content during scaling.
 void setScale(java.lang.Boolean scale)
          Defines, whether the image content should be scaled to fit the complete image element bounds.
 
Methods inherited from class org.jfree.report.elementfactory.ElementFactory
applyElementName, createElement, 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

ImageElementFactory

public ImageElementFactory()
DefaultConstructor.

Method Detail

getScale

public java.lang.Boolean getScale()
Returns, whether the image content should be scaled to fit the complete image element bounds.

Returns:
the scale flag of the image element.

setScale

public void setScale(java.lang.Boolean scale)
Defines, whether the image content should be scaled to fit the complete image element bounds.

Parameters:
scale - the scale flag of the image element.

getKeepAspectRatio

public java.lang.Boolean getKeepAspectRatio()
Returns whether the generated image element should preserve the original aspect ratio of the image content during scaling. This property has no effect if the image content is not scaled.

Returns:
the keep aspect ratio flag.

setKeepAspectRatio

public void setKeepAspectRatio(java.lang.Boolean keepAspectRatio)
Defines whether the generated image element should preserve the original aspect ratio of the image content during scaling. This property has no effect if the image content is not scaled.

Parameters:
keepAspectRatio - whether to keep the aspect ratio of the image content during the scaling.

applyStyle

protected void applyStyle(ElementStyleSheet style)
Applies the style definition to the elements stylesheet.

Overrides:
applyStyle in class ElementFactory
Parameters:
style - the element stylesheet which should receive the style definition.