net.sf.jasperreports.engine.component
Class BaseFillComponent

java.lang.Object
  extended by net.sf.jasperreports.engine.component.BaseFillComponent
All Implemented Interfaces:
FillComponent
Direct Known Subclasses:
BarbecueFillComponent, BarcodeFillComponent, BaseFillList, FillSpiderChart, FillTable

public abstract class BaseFillComponent
extends java.lang.Object
implements FillComponent

A base abstract implementation of a fill component.

Version:
$Id: BaseFillComponent.java 3033 2009-08-27 11:46:22Z teodord $
Author:
Lucian Chirita ([email protected])

Field Summary
protected  FillContext fillContext
          The fill context, as set by initialize(FillContext).
 
Constructor Summary
BaseFillComponent()
           
 
Method Summary
 void evaluateDelayedElement(JRPrintElement element, byte evaluation)
          The default implementation throws UnsupportedOperationException.
protected  java.lang.Object evaluateExpression(JRExpression expression, byte evaluation)
          Evaluates an expression.
 void initialize(FillContext fillContext)
          Initializes the fill component with the fill context.
 void rewind()
          The default implementation is empty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jasperreports.engine.component.FillComponent
evaluate, fill, prepare
 

Field Detail

fillContext

protected FillContext fillContext
The fill context, as set by initialize(FillContext).

Constructor Detail

BaseFillComponent

public BaseFillComponent()
Method Detail

initialize

public void initialize(FillContext fillContext)
Description copied from interface: FillComponent
Initializes the fill component with the fill context.

This method is called before the fill component is used.

Specified by:
initialize in interface FillComponent
Parameters:
fillContext - the fill context

evaluateExpression

protected final java.lang.Object evaluateExpression(JRExpression expression,
                                                    byte evaluation)
                                             throws JRException
Evaluates an expression.

Parameters:
expression - the expression to evaluate
evaluation - the evaluation type
Returns:
the evaluation result
Throws:
JRException

evaluateDelayedElement

public void evaluateDelayedElement(JRPrintElement element,
                                   byte evaluation)
                            throws JRException
The default implementation throws UnsupportedOperationException.

If a component supports delayed evaluation, it needs to override this method.

Specified by:
evaluateDelayedElement in interface FillComponent
Parameters:
element - the print element for which delayed evaluation has been registered
evaluation - the evaluation type
Throws:
JRException
See Also:
FillComponent.evaluate(byte)

rewind

public void rewind()
The default implementation is empty.

Override this method if something needs to be done on component rewind.

Specified by:
rewind in interface FillComponent


Copyright © 2011. All Rights Reserved.