org.jfree.report.filter.templates
Class ImageURLFieldTemplate

java.lang.Object
  |
  +--org.jfree.report.filter.templates.AbstractTemplate
        |
        +--org.jfree.report.filter.templates.ImageURLFieldTemplate

public class ImageURLFieldTemplate
extends AbstractTemplate
implements ReportConnectable

An image URL field template, which reads the image from an URL supplied from a column in the DataRow.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
ImageURLFieldTemplate()
          Creates a new template.
 
Method Summary
 java.lang.Object clone()
          Clones the template.
 java.net.URL getBaseURL()
          Returns the base URL.
protected  DataRowDataSource getDataRowDataSource()
          Returns the datarow data source used in this template.
 java.lang.String getField()
          Returns the name of the field from the data-row that the template gets images from.
 java.lang.Object getValue()
          Returns the current value for the data source.
 void registerReportDefinition(ReportDefinition reportDefinition)
          Connects the connectable to the given report definition.
 void setBaseURL(java.net.URL baseURL)
          Sets the base URL.
 void setField(java.lang.String field)
          Sets the field name.
 void unregisterReportDefinition(ReportDefinition reportDefinition)
          Disconnects this ReportConnectable from the report definition.
 
Methods inherited from class org.jfree.report.filter.templates.AbstractTemplate
getInstance, getName, setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageURLFieldTemplate

public ImageURLFieldTemplate()
Creates a new template.
Method Detail

getField

public java.lang.String getField()
Returns the name of the field from the data-row that the template gets images from.
Returns:
The field name.

setField

public void setField(java.lang.String field)
Sets the field name.
Parameters:
field - the field name.

getBaseURL

public java.net.URL getBaseURL()
Returns the base URL.
Returns:
The base URL.

setBaseURL

public void setBaseURL(java.net.URL baseURL)
Sets the base URL.
Parameters:
baseURL - the base URL.

getValue

public java.lang.Object getValue()
Returns the current value for the data source.
Returns:
the value.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clones the template.
Overrides:
clone in class AbstractTemplate
Returns:
the clone.
Throws:
java.lang.CloneNotSupportedException - this should never happen.

registerReportDefinition

public void registerReportDefinition(ReportDefinition reportDefinition)
Connects the connectable to the given report definition.
Specified by:
registerReportDefinition in interface ReportConnectable
Parameters:
reportDefinition - the reportDefinition for this report connectable.

unregisterReportDefinition

public void unregisterReportDefinition(ReportDefinition reportDefinition)
Disconnects this ReportConnectable from the report definition.
Specified by:
unregisterReportDefinition in interface ReportConnectable
Parameters:
reportDefinition - the ReportDefinition.

getDataRowDataSource

protected DataRowDataSource getDataRowDataSource()
Returns the datarow data source used in this template.
Returns:
the datarow data source.