org.jfree.report.elementfactory
Class ComponentFieldElementFactory

java.lang.Object
  |
  +--org.jfree.report.elementfactory.ElementFactory
        |
        +--org.jfree.report.elementfactory.ComponentFieldElementFactory

public class ComponentFieldElementFactory
extends ElementFactory

The drawable field element factory can be used to create elements that display Drawable elements.

A drawable field expects the named datasource to contain Drawable objects.

Once the desired properties are set, the factory can be reused to create similiar elements.

Author:
Thomas Morgner
See Also:
Drawable

Constructor Summary
ComponentFieldElementFactory()
          DefaultConstructor.
 
Method Summary
 Element createElement()
          Creates a new drawable field element based on the defined properties.
 java.lang.String getFieldname()
          Returns the field name from where to read the content of the element.
 void setFieldname(java.lang.String fieldname)
          Defines the field name from where to read the content of the element.
 
Methods inherited from class org.jfree.report.elementfactory.ElementFactory
applyElementName, applyStyle, getAbsolutePosition, getDynamicHeight, getHRefTarget, getHRefWindow, getLayoutCachable, getMaximumSize, getMinimumSize, getName, getPreferredSize, getVisible, setAbsolutePosition, setDynamicHeight, setHRefTarget, setHRefWindow, setLayoutCachable, setMaximumSize, setMinimumSize, setName, setPreferredSize, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentFieldElementFactory

public ComponentFieldElementFactory()
DefaultConstructor.
Method Detail

getFieldname

public java.lang.String getFieldname()
Returns the field name from where to read the content of the element.
Returns:
the field name.

setFieldname

public void setFieldname(java.lang.String fieldname)
Defines the field name from where to read the content of the element. The field name is the name of a datarow column.
Parameters:
fieldname - the field name.

createElement

public Element createElement()
Creates a new drawable field element based on the defined properties.
Overrides:
createElement in class ElementFactory
Returns:
the generated elements
Throws:
java.lang.IllegalStateException - if the field name is not set.
See Also:
ElementFactory.createElement()