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

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

public class LabelTemplate
extends AbstractTemplate

A label template can be used to describe static text content.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
LabelTemplate()
          Creates a new label template.
 
Method Summary
 Object clone()
          Clones the template.
 String getContent()
          Returns the text for the label.
 String getNullValue()
          Returns the string that represents null.
 Object getValue(ExpressionRuntime runtime, Element element)
          Returns the current value for the data source.
 void setContent(String content)
          Sets the text for the label.
 void setNullValue(String nullValue)
          Sets the string that represents null.
 
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

LabelTemplate

public LabelTemplate()
Creates a new label template.

Method Detail

setContent

public void setContent(String content)
Sets the text for the label.

Parameters:
content - the text.

getContent

public String getContent()
Returns the text for the label.

Returns:
The text.

getNullValue

public String getNullValue()
Returns the string that represents null.

Returns:
The string that represents null.

setNullValue

public void setNullValue(String nullValue)
Sets the string that represents null.

Parameters:
nullValue - the string.

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.