org.pentaho.reporting.engine.classic.core.elementfactory
Class ContentFieldElementFactory

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.elementfactory.ElementFactory
      extended by org.pentaho.reporting.engine.classic.core.elementfactory.AbstractContentElementFactory
          extended by org.pentaho.reporting.engine.classic.core.elementfactory.ContentFieldElementFactory

public class ContentFieldElementFactory
extends AbstractContentElementFactory

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

Constructor Summary
ContentFieldElementFactory()
          DefaultConstructor.
 
Method Summary
 Element createElement()
          Creates a new drawable field element based on the defined properties.
 URL getBaseURL()
          Returns the base url.
 String getFieldname()
          Returns the field name from where to read the content of the element.
 String getFormula()
          Returns the formula that should be used to compute the value of the field.
 Object getNullValue()
           
 void setBaseURL(URL baseURL)
          Defines a BaseURL for the new element.
 void setFieldname(String fieldname)
          Defines the field name from where to read the content of the element.
 void setFormula(String formula)
          Assigns a formula to the element to compute the value for this element.
 void setNullValue(Object nullValue)
           
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.elementfactory.AbstractContentElementFactory
getFillColor, getKeepAspectRatio, getScale, getShouldDraw, getShouldFill, getStroke, setFillColor, setKeepAspectRatio, setScale, setShouldDraw, setShouldFill, setStroke
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.elementfactory.ElementFactory
getAbsolutePosition, getAvoidPagebreaks, getBackgroundColor, getBorderBottomColor, getBorderBottomLeftRadius, getBorderBottomLeftRadiusHeight, getBorderBottomLeftRadiusWidth, getBorderBottomRightRadius, getBorderBottomRightRadiusHeight, getBorderBottomRightRadiusWidth, getBorderBottomStyle, getBorderBottomWidth, getBorderBreakColor, getBorderBreakStyle, getBorderBreakWidth, getBorderColor, getBorderLeftColor, getBorderLeftStyle, getBorderLeftWidth, getBorderRadius, getBorderRadiusHeight, getBorderRadiusWidth, getBorderRightColor, getBorderRightStyle, getBorderRightWidth, getBorderStyle, getBorderTopColor, getBorderTopLeftRadius, getBorderTopLeftRadiusHeight, getBorderTopLeftRadiusWidth, getBorderTopRightRadius, getBorderTopRightRadiusHeight, getBorderTopRightRadiusWidth, getBorderTopStyle, getBorderTopWidth, getBorderWidth, getColor, getDynamicHeight, getFontSmooth, getHeight, getHorizontalAlignment, getHRefTarget, getHRefTitle, getHRefWindow, getLayoutCachable, getMaximumHeight, getMaximumSize, getMaximumWidth, getMinimumHeight, getMinimumSize, getMinimumWidth, getName, getOrphans, getOverflowX, getOverflowY, getPadding, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPreferredSize, getUseMinChunkWidth, getVerticalAlignment, getVisible, getWidows, getWidth, getX, getY, setAbsolutePosition, setAvoidPagebreaks, setBackgroundColor, setBorderBottomColor, setBorderBottomLeftRadius, setBorderBottomLeftRadiusHeight, setBorderBottomLeftRadiusWidth, setBorderBottomRightRadius, setBorderBottomRightRadiusHeight, setBorderBottomRightRadiusWidth, setBorderBottomStyle, setBorderBottomWidth, setBorderBreakColor, setBorderBreakStyle, setBorderBreakWidth, setBorderColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRadius, setBorderRadiusHeight, setBorderRadiusWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderStyle, setBorderTopColor, setBorderTopLeftRadius, setBorderTopLeftRadiusHeight, setBorderTopLeftRadiusWidth, setBorderTopRightRadius, setBorderTopRightRadiusHeight, setBorderTopRightRadiusWidth, setBorderTopStyle, setBorderTopWidth, setBorderWidth, setColor, setDynamicHeight, setFontSmooth, setHeight, setHorizontalAlignment, setHRefTarget, setHRefTitle, setHRefWindow, setLayoutCachable, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setName, setOrphans, setOverflowX, setOverflowY, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPreferredSize, setUseMinChunkWidth, setVerticalAlignment, setVisible, setWidows, setWidth, setX, setY
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentFieldElementFactory

public ContentFieldElementFactory()
DefaultConstructor.

Method Detail

getFieldname

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

Returns:
the field name.

setFieldname

public void setFieldname(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.

getFormula

public String getFormula()
Returns the formula that should be used to compute the value of the field. The formula must be valid according to the OpenFormula specifications.

Returns:
the formula as string.

getBaseURL

public URL getBaseURL()
Returns the base url. The BaseURL is used to resolve relative URLs found in the datasource.

Returns:
the base url.

setBaseURL

public void setBaseURL(URL baseURL)
Defines a BaseURL for the new element. The BaseURL is used to resolve relative URLs found in the datasource.

Parameters:
baseURL - the base URL.

setFormula

public void setFormula(String formula)
Assigns a formula to the element to compute the value for this element. If a formula is defined, it will override the 'field' property.

Parameters:
formula - the formula as a string.

getNullValue

public Object getNullValue()

setNullValue

public void setNullValue(Object nullValue)

createElement

public Element createElement()
Creates a new drawable field element based on the defined properties.

Specified by:
createElement in class ElementFactory
Returns:
the generated elements
Throws:
IllegalStateException - if the field name is not set.
See Also:
ElementFactory.createElement()