org.pentaho.reporting.engine.classic.core.filter
Class ImageRefFilter

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.filter.ImageRefFilter
All Implemented Interfaces:
Serializable, Cloneable, DataFilter, DataSource, DataTarget

public class ImageRefFilter
extends Object
implements DataFilter

A filter that converts an Image to an ImageReference. The DataSource is expected to contain an java.awt.Image, the image is then wrapped into an ImageReference and this ImageReference is returned to the caller.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
ImageRefFilter()
          Default constructor.
 
Method Summary
 Object clone()
          Clones the filter.
 DataSource getDataSource()
          Returns the data source for the filter.
 Object getValue(ExpressionRuntime runtime, Element element)
          Returns the current value for the data source.
 void setDataSource(DataSource dataSource)
          Sets the data source for the filter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageRefFilter

public ImageRefFilter()
Default constructor.

Method Detail

getDataSource

public DataSource getDataSource()
Returns the data source for the filter.

Specified by:
getDataSource in interface DataTarget
Returns:
The data source.

setDataSource

public void setDataSource(DataSource dataSource)
Sets the data source for the filter.

Specified by:
setDataSource in interface DataTarget
Parameters:
dataSource - The data source.

getValue

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

The returned object, unless it is null, will be an instance of ImageReference.

Specified by:
getValue in interface DataSource
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 filter.

Specified by:
clone in interface DataSource
Specified by:
clone in interface DataTarget
Overrides:
clone in class Object
Returns:
A clone of this filter.
Throws:
CloneNotSupportedException - this should never happen.