public class ImageLoadFilter extends Object implements DataFilter
null
is returned.
This filter is mostly used in conjunction with the URLFilter, which creates URLs from Strings and files if nessesary.
The url is used to create a new imagereference which is returned to the caller. The loaded/created imagereference is
stored in an internal cache.
This filter can be used to dynamically change images of a report, a very nice feature for photo albums and catalogs
for instance.
This filter will return null, if something else than an URL was retrieved from the assigned datasourceConstructor and Description |
---|
ImageLoadFilter()
creates a new ImageLoadFilter with a cache size of 10.
|
ImageLoadFilter(int cacheSize)
Creates a new ImageLoadFilter with the defined cache size.
|
Modifier and Type | Method and Description |
---|---|
ImageLoadFilter |
clone()
Clones the filter.
|
DataSource |
getDataSource()
Returns the data source for the filter.
|
Object |
getValue(ExpressionRuntime runtime,
ReportElement element)
Reads this filter's datasource and if the source returned an URL, tries to form a imagereference.
|
void |
setDataSource(DataSource ds)
Sets the data source.
|
public ImageLoadFilter()
public ImageLoadFilter(int cacheSize)
cacheSize
- the cache size.public Object getValue(ExpressionRuntime runtime, ReportElement element)
getValue
in interface DataSource
runtime
- the expression runtime that is used to evaluate formulas and expressions when computing the value of this
filter.element
- public DataSource getDataSource()
getDataSource
in interface DataTarget
public void setDataSource(DataSource ds)
setDataSource
in interface DataTarget
ds
- The data source.public ImageLoadFilter clone() throws CloneNotSupportedException
clone
in interface DataSource
clone
in interface DataTarget
clone
in class Object
CloneNotSupportedException
- this should never happen.Copyright © 2002–2017 Pentaho Corporation. All rights reserved.