org.pentaho.reporting.engine.classic.core.function
Class PaintComponentFunction

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.function.AbstractExpression
      extended by org.pentaho.reporting.engine.classic.core.function.AbstractFunction
          extended by org.pentaho.reporting.engine.classic.core.function.PaintComponentFunction
All Implemented Interfaces:
Serializable, Cloneable, EventListener, ReportListener, Expression, Function

Deprecated. Use the new Component-Element instead. It uses drawables for this job, and therefore the result looks much better. This method does no longer work, as it depended on implementation details that are no longer in use.

public class PaintComponentFunction
extends AbstractFunction

Paints a AWT or Swing Component, fitting the component into the element bounds. The component must be contained in the dataRow.

In an headless environment this function wont work and will always return null.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
PaintComponentFunction()
          Deprecated. DefaultConstructor.
 
Method Summary
 String getElement()
          Deprecated. Returns the element used by the function.
 String getField()
          Deprecated. Returns the field used by the function.
 Expression getInstance()
          Deprecated. Return a completly separated copy of this function.
 float getScale()
          Deprecated. Gets the scale factor for the created image.
 Object getValue()
          Deprecated. Return the current expression value.
 void setElement(String field)
          Deprecated. Sets the element name for the function.
 void setField(String field)
          Deprecated. Sets the field name for the function.
 void setScale(float scale)
          Deprecated. Define a scale factor for the created image.
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractFunction
groupFinished, groupStarted, itemsAdvanced, itemsFinished, itemsStarted, reportDone, reportFinished, reportInitialized, reportStarted
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
clone, getDataRow, getDependencyLevel, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pentaho.reporting.engine.classic.core.function.Expression
clone, getDataRow, getDependencyLevel, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setDependencyLevel, setName, setRuntime
 

Constructor Detail

PaintComponentFunction

public PaintComponentFunction()
Deprecated. 
DefaultConstructor.

Method Detail

getElement

public String getElement()
Deprecated. 
Returns the element used by the function.

The element name corresponds to a element in the report. The element name must be unique, as the first occurence of the element is used.

Returns:
The field name.

setElement

public void setElement(String field)
Deprecated. 
Sets the element name for the function.

The element name corresponds to a element in the report. The element name must be unique, as the first occurence of the element is used.

Parameters:
field - the field name (null not permitted).

getField

public String getField()
Deprecated. 
Returns the field used by the function. The field name corresponds to a column name in the report's data-row.

Returns:
The field name.

setField

public void setField(String field)
Deprecated. 
Sets the field name for the function. The field name corresponds to a column name in the report's data-row.

Parameters:
field - the field name.

getValue

public Object getValue()
Deprecated. 
Return the current expression value.

The value depends (obviously) on the expression implementation.

Returns:
the value of the function.

setScale

public void setScale(float scale)
Deprecated. 
Define a scale factor for the created image. Using a higher scale factor will produce better results. A scale factor of 2 will double the resolution. A scale factor of 1 will create 72 dpi images.

Parameters:
scale - the scale factor.

getScale

public float getScale()
Deprecated. 
Gets the scale factor for the created image. Using a higher scale factor will produce better results. A scale factor of 2 will double the resolution. A scale factor of 1 will create 72 dpi images.

Returns:
the scale factor.

getInstance

public Expression getInstance()
Deprecated. 
Return a completly separated copy of this function. The copy does no longer share any changeable objects with the original function.

Specified by:
getInstance in interface Expression
Overrides:
getInstance in class AbstractExpression
Returns:
a copy of this function.