| java.lang.Object org.jfree.report.filter.DrawableLoadFilter
DrawableLoadFilter | public class DrawableLoadFilter implements DataFilter(Code) | | The DrawableLoadFilter is used to load drawable image files (like WMF's) during the
report generation process. This filter expects its datasource to return a java.net.URL.
If the datasource does not return an URL, null is returned as result of
calling "getValue()".
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 Drawable object which is returned to the caller. The
loaded/created Drawable is also 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 datasource
author: Thomas Morgner |
Constructor Summary | |
public | DrawableLoadFilter() creates a new ImageLoadFilter with a cache size of 10. | public | DrawableLoadFilter(int cacheSize) Creates a new ImageLoadFilter with the defined cache size. |
DrawableLoadFilter | public DrawableLoadFilter()(Code) | | creates a new ImageLoadFilter with a cache size of 10.
|
DrawableLoadFilter | public DrawableLoadFilter(int cacheSize)(Code) | | Creates a new ImageLoadFilter with the defined cache size.
Parameters: cacheSize - the cache size. |
getDataSource | public DataSource getDataSource()(Code) | | Returns the data source for the filter.
The data source. |
getValue | public Object getValue(ExpressionRuntime runtime)(Code) | | Reads this filter's datasource and if the source returned an URL, tries to form a
imagereference. If the image is loaded in a previous run and is still in the cache,
no new reference is created and the previously loaded reference is returned.
Parameters: runtime - the expression runtime that is used to evaluate formulas and expressions when computing the value ofthis filter. the current value for this filter. |
setDataSource | public void setDataSource(DataSource ds)(Code) | | Sets the data source.
Parameters: ds - The data source. |
|
|