com.jrefinery.report.filter.templates
Class AbstractTemplate

java.lang.Object
  extended bycom.jrefinery.report.filter.templates.AbstractTemplate
All Implemented Interfaces:
java.lang.Cloneable, DataSource, java.io.Serializable, Template
Direct Known Subclasses:
DateFieldTemplate, ImageFieldTemplate, ImageURLElementTemplate, ImageURLFieldTemplate, LabelTemplate, NumberFieldTemplate, ResourceFieldTemplate, ResourceLabelTemplate, ShapeFieldTemplate, StringFieldTemplate

public abstract class AbstractTemplate
extends java.lang.Object
implements Template

An abstract base class that implements the Template interface.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
AbstractTemplate()
          Creates a new template.
 
Method Summary
 java.lang.Object clone()
          Clones the template.
 Template getInstance()
          Returns an instance of the template by cloning.
 java.lang.String getName()
          Returns the template name.
 void setName(java.lang.String name)
          Sets the template name.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jrefinery.report.filter.DataSource
getValue
 

Constructor Detail

AbstractTemplate

public AbstractTemplate()
Creates a new template.

Method Detail

setName

public void setName(java.lang.String name)
Sets the template name.

Specified by:
setName in interface Template
Parameters:
name - the name (null not permitted).

getName

public java.lang.String getName()
Returns the template name.

Specified by:
getName in interface Template
Returns:
The name.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clones the template.

Specified by:
clone in interface DataSource
Returns:
the clone.
Throws:
java.lang.CloneNotSupportedException - this should never happen.

getInstance

public Template getInstance()
Returns an instance of the template by cloning.

Specified by:
getInstance in interface Template
Returns:
A clone.