com.jrefinery.report.filter
Class ImageRefFilter

java.lang.Object
  |
  +--com.jrefinery.report.filter.ImageRefFilter
All Implemented Interfaces:
java.lang.Cloneable, DataFilter, DataSource, DataTarget, java.io.Serializable

public class ImageRefFilter
extends java.lang.Object
implements DataFilter, java.io.Serializable

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
 java.lang.Object clone()
          Clones the filter.
 DataSource getDataSource()
          Returns the data source for the filter.
 java.lang.Class getDataType()
          Returns the data type for the filter.
 java.lang.Object getValue()
          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, finalize, 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 java.lang.Object getValue()
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
Returns:
The value.

getDataType

public java.lang.Class getDataType()
Returns the data type for the filter.

The type is ImageReference.

Returns:
The data type.

clone

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

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