Class ComponentDrawableFilter
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.filter.ComponentDrawableFilter
-
- All Implemented Interfaces:
Serializable
,Cloneable
,DataFilter
,DataSource
,DataTarget
public class ComponentDrawableFilter extends Object implements DataFilter
A filter that wraps AWT- and Swing-components into a Drawable implementation.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ComponentDrawableFilter()
Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentDrawableFilter
clone()
Creates a clone of this filter.DataSource
getDataSource()
Returns the assigned DataSource for this Target.Object
getValue(ExpressionRuntime runtime, ReportElement element)
Returns the ComponentDrawable for the AWT-Component or null.protected static boolean
isHeadless()
A helper method that queries the configuration (and therefore also the system properties) for whether the system is in headless mode.void
setDataSource(DataSource ds)
Assigns a DataSource for this Target.
-
-
-
Method Detail
-
getValue
public Object getValue(ExpressionRuntime runtime, ReportElement element)
Returns the ComponentDrawable for the AWT-Component or null.- Specified by:
getValue
in interfaceDataSource
- Parameters:
runtime
- the expression runtime that is used to evaluate formulas and expressions when computing the value of this filter.element
-- Returns:
- the value.
-
isHeadless
protected static boolean isHeadless()
A helper method that queries the configuration (and therefore also the system properties) for whether the system is in headless mode.- Returns:
- true, if the system is headless, false otherwise.
-
clone
public ComponentDrawableFilter clone() throws CloneNotSupportedException
Creates a clone of this filter.- Specified by:
clone
in interfaceDataSource
- Specified by:
clone
in interfaceDataTarget
- Overrides:
clone
in classObject
- Returns:
- the clone.
- Throws:
CloneNotSupportedException
- if an error occured.
-
getDataSource
public DataSource getDataSource()
Returns the assigned DataSource for this Target.- Specified by:
getDataSource
in interfaceDataTarget
- Returns:
- The datasource.
-
setDataSource
public void setDataSource(DataSource ds)
Assigns a DataSource for this Target.- Specified by:
setDataSource
in interfaceDataTarget
- Parameters:
ds
- The data source.
-
-