Class BaseFillComponent
java.lang.Object
net.sf.jasperreports.engine.component.BaseFillComponent
- All Implemented Interfaces:
FillComponent
- Direct Known Subclasses:
BarbecueFillComponent,BarcodeFillComponent,BaseFillList,FillSpiderChart,IconLabelComponentFill,SubreportFillComponent
A base abstract implementation of a fill component.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FillContextThe fill context, as set byinitialize(FillContext).protected PrintElementOriginator -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedBaseFillComponent(BaseFillComponent fillComponent, JRFillCloneFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T extends Deduplicable>
Tdeduplicate(T object) Deduplicates an object by looking for an identical one that's already present in the fill context.voidevaluateDelayedElement(JRPrintElement element, byte evaluation) The default implementation throwsUnsupportedOperationException.protected final ObjectevaluateExpression(JRExpression expression, byte evaluation) Evaluates an expression.voidinitialize(FillContext fillContext) Initializes the fill component with the fill context.voidrewind()The default implementation is empty.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.jasperreports.engine.component.FillComponent
evaluate, fill, prepare, prepare
-
Field Details
-
fillContext
The fill context, as set byinitialize(FillContext). -
printElementOriginator
-
-
Constructor Details
-
BaseFillComponent
protected BaseFillComponent() -
BaseFillComponent
-
-
Method Details
-
initialize
Description copied from interface:FillComponentInitializes the fill component with the fill context.This method is called before the fill component is used.
- Specified by:
initializein interfaceFillComponent- Parameters:
fillContext- the fill context
-
evaluateExpression
protected final Object evaluateExpression(JRExpression expression, byte evaluation) throws JRException Evaluates an expression.- Parameters:
expression- the expression to evaluateevaluation- the evaluation type- Returns:
- the evaluation result
- Throws:
JRException
-
evaluateDelayedElement
The default implementation throwsUnsupportedOperationException.If a component supports delayed evaluation, it needs to override this method.
- Specified by:
evaluateDelayedElementin interfaceFillComponent- Parameters:
element- the print element for which delayed evaluation has been registeredevaluation- the evaluation type- Throws:
JRException- See Also:
-
rewind
public void rewind()The default implementation is empty.Override this method if something needs to be done on component rewind.
- Specified by:
rewindin interfaceFillComponent
-
deduplicate
Deduplicates an object by looking for an identical one that's already present in the fill context. This operations should be performed onelement templatesin order to prevent creation of a large number of identical instances.- Parameters:
object- the object to deduplicate- Returns:
- a duplicate of the object if found, or the passed object if not
-