org.pentaho.reporting.engine.classic.core.filter.templates
Class ComponentFieldTemplate

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.filter.templates.AbstractTemplate
      extended by org.pentaho.reporting.engine.classic.core.filter.templates.ComponentFieldTemplate
All Implemented Interfaces:
Serializable, Cloneable, DataSource, Template

public class ComponentFieldTemplate
extends AbstractTemplate

An drawable field template. The drawable content will be read from the datarow.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
ComponentFieldTemplate()
          Creates a new image field template.
 
Method Summary
 Object clone()
          Clones the template.
 String getField()
          Returns the field name.
 String getFormula()
          Returns the formula used to compute the value of the data source.
 Object getValue(ExpressionRuntime runtime, Element element)
          Returns the current value for the data source.
 void setField(String field)
          Sets the field name.
 void setFormula(String formula)
          Defines the formula used to compute the value of this data source.
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.filter.templates.AbstractTemplate
getInstance, getName, setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentFieldTemplate

public ComponentFieldTemplate()
Creates a new image field template.

Method Detail

getField

public String getField()
Returns the field name.

Returns:
The field name.

setField

public void setField(String field)
Sets the field name.

Parameters:
field - the field name.

getFormula

public String getFormula()
Returns the formula used to compute the value of the data source.

Returns:
the formula.

setFormula

public void setFormula(String formula)
Defines the formula used to compute the value of this data source.

Parameters:
formula - the formula for the data source.

getValue

public Object getValue(ExpressionRuntime runtime,
                       Element element)
Returns the current value for the data source.

Parameters:
runtime - the expression runtime that is used to evaluate formulas and expressions when computing the value of this filter.
element -
Returns:
the value.

clone

public Object clone()
             throws CloneNotSupportedException
Clones the template.

Specified by:
clone in interface DataSource
Overrides:
clone in class AbstractTemplate
Returns:
the clone.
Throws:
CloneNotSupportedException - this should never happen.