Class LabelTemplate
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.filter.templates.AbstractTemplate
-
- 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
Constructors Constructor Description LabelTemplate()
Creates a new label template.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LabelTemplate
clone()
Clones the template.String
getContent()
Returns the text for the label.String
getNullValue()
Returns the string that representsnull
.Object
getValue(ExpressionRuntime runtime, ReportElement 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 representsnull
.-
Methods inherited from class org.pentaho.reporting.engine.classic.core.filter.templates.AbstractTemplate
getInstance, getName, setName
-
-
-
-
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 representsnull
.- Returns:
- The string that represents
null
.
-
setNullValue
public void setNullValue(String nullValue)
Sets the string that representsnull
.- Parameters:
nullValue
- the string.
-
getValue
public Object getValue(ExpressionRuntime runtime, ReportElement 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 LabelTemplate clone() throws CloneNotSupportedException
Clones the template.- Specified by:
clone
in interfaceDataSource
- Overrides:
clone
in classAbstractTemplate
- Returns:
- the clone.
- Throws:
CloneNotSupportedException
- this should never happen.
-
-