org.jfree.report.elementfactory
Class ShapeElementFactory

java.lang.Object
  extended byorg.jfree.report.elementfactory.ElementFactory
      extended byorg.jfree.report.elementfactory.ShapeElementFactory
Direct Known Subclasses:
ShapeFieldElementFactory, StaticShapeElementFactory

public abstract class ShapeElementFactory
extends ElementFactory

A base implementation of a factory to define ShapeElements.

Author:
Thomas Morgner

Constructor Summary
ShapeElementFactory()
          DefaultConstructor.
 
Method Summary
protected  void applyStyle(ElementStyleSheet style)
          Applies the style definition to the elements stylesheet.
 java.awt.Color getColor()
          Returns the shape color.
 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.
 java.lang.Boolean getShouldDraw()
          Returns whether to draw the shape outline on report generation.
 java.lang.Boolean getShouldFill()
          Return whether to fill the shape on report generation.
 java.awt.Stroke getStroke()
          Returns the shapes stroke.
 void setColor(java.awt.Color color)
          Defines the color of the shape.
 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.
 void setShouldDraw(java.lang.Boolean shouldDraw)
          Defines whether to draw the shape outline on report generation.
 void setShouldFill(java.lang.Boolean shouldFill)
          Defines wether to fill the shape on report generation.
 void setStroke(java.awt.Stroke stroke)
          Defines the shapes stroke.
 
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

ShapeElementFactory

public ShapeElementFactory()
DefaultConstructor.

Method Detail

getColor

public java.awt.Color getColor()
Returns the shape color.

Returns:
the color of the shape.

setColor

public void setColor(java.awt.Color color)
Defines the color of the shape.

Parameters:
color - the color of the shape.

getStroke

public java.awt.Stroke getStroke()
Returns the shapes stroke. The stroke is used to draw the outline of the shape.

Returns:
the stoke.

setStroke

public void setStroke(java.awt.Stroke stroke)
Defines the shapes stroke. The stroke is used to draw the outline of the shape.

Parameters:
stroke - the stoke.

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.

getShouldFill

public java.lang.Boolean getShouldFill()
Return whether to fill the shape on report generation.

Returns:
the should fill flag.

setShouldFill

public void setShouldFill(java.lang.Boolean shouldFill)
Defines wether to fill the shape on report generation.

Parameters:
shouldFill - the fill flag.

getShouldDraw

public java.lang.Boolean getShouldDraw()
Returns whether to draw the shape outline on report generation.

Returns:
the draw shape flag.

setShouldDraw

public void setShouldDraw(java.lang.Boolean shouldDraw)
Defines whether to draw the shape outline on report generation.

Parameters:
shouldDraw - the draw shape flag.

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.