net.sf.jasperreports.engine.fill
Class JRFillComponentElement

java.lang.Object
  extended by net.sf.jasperreports.engine.fill.JRFillElement
      extended by net.sf.jasperreports.engine.fill.JRFillComponentElement
All Implemented Interfaces:
java.lang.Cloneable, FillContext, JRFillCloneable, JRFillExpressionEvaluator, JRChild, JRCloneable, JRCommonElement, JRComponentElement, JRElement, JRIdentifiable, JRPropertiesHolder, JRStyleContainer, JRStyleSetter, JRVisitable

public class JRFillComponentElement
extends JRFillElement
implements JRComponentElement, FillContext

A JRComponentElement which is used during report fill.

Version:
$Id: JRFillComponentElement.java 5050 2012-03-12 10:11:26Z teodord $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)

Field Summary
 
Fields inherited from class net.sf.jasperreports.engine.fill.JRFillElement
band, conditionalStylesContainer, currentEvaluation, currentStyle, defaultStyleProvider, delayedEvaluationsMap, dynamicProperties, elementGroup, elementId, expressionEvaluator, filler, initStyle, mergedProperties, originProvider, parent, printWhenGroupChanges, staticProperties, templates
 
Constructor Summary
JRFillComponentElement(JRBaseFiller filler, JRComponentElement element, JRFillObjectFactory factory)
           
JRFillComponentElement(JRFillComponentElement element, JRFillCloneFactory factory)
           
 
Method Summary
 void collectExpressions(JRExpressionCollector collector)
           
 JRFillCloneable createClone(JRFillCloneFactory factory)
          Creates a working clone of itself.
protected  JRTemplateElement createElementTemplate()
           
protected  void evaluate(byte evaluation)
           
 java.lang.Object evaluate(JRExpression expression, byte evaluation)
          Evaluates an expression in the main report dataset.
protected  JRPrintElement fill()
           
 Component getComponent()
          Returns the component instance wrapped by this element.
 JRComponentElement getComponentElement()
          Returns the component element that wraps the component.
 ComponentKey getComponentKey()
          Returns the component type key for this element.
 JROrigin getElementOrigin()
          Returns the origin of the current component element.
 int getElementPrintY()
          Returns the position on the vertical axis where the component element starts printing.
 int getElementSourceId()
          Returns the fill element Id associated to the component element.
 JRStyle getElementStyle()
          Returns the current style of the component element.
 JRFillDataset getFillDataset()
          Returns the dataset used by the expression evaluator.
 JRBaseFiller getFiller()
          Returns the filler object.
 java.util.Locale getReportLocale()
          Returns the locale used to fill the current report.
 java.util.ResourceBundle getReportResourceBundle()
          Returns the resource bundle used for the current report.
 java.util.TimeZone getReportTimezone()
          Returns the time zone used to fill the current report.
protected  boolean prepare(int availableHeight, boolean isOverflow)
           
 void registerDelayedEvaluation(JRPrintElement printElement, EvaluationTimeEnum evaluationTime, java.lang.String evaluationGroup)
          Registers a delayed evaluation for a print element.
protected  void resolveElement(JRPrintElement element, byte evaluation)
          Resolves an element.
protected  void resolveElement(JRPrintElement element, byte evaluation, JREvaluationTime evaluationTime)
          Resolves an element.
protected  void rewind()
           
 void visit(JRVisitor visitor)
           
 
Methods inherited from class net.sf.jasperreports.engine.fill.JRFillElement
addDependantElement, clone, clone, collectDelayedEvaluations, collectDelayedEvaluations, collectDelayedEvaluations, collectStyleDelayedEvaluations, delayedEvaluate, evaluateExpression, evaluatePrintWhenExpression, evaluateProperties, getBackcolor, getBand, getDefaultStyleProvider, getDependantElements, getElementGroup, getElementTemplate, getEvaluatedProperties, getEvaluationTimeValue, getField, getForecolor, getGroupElements, getHeight, getKey, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParentProperties, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertiesMap, getPropertyExpressions, getRelativeY, getStretchHeight, getStretchTypeValue, getStyle, getStyleNameReference, getTemplate, getUUID, getVariable, getWidth, getX, getY, hasProperties, initDelayedEvaluationPrint, initDelayedEvaluations, isAlreadyPrinted, isAutoEvaluateNow, isDelayedStyleEvaluation, isEvaluateAuto, isEvaluateNow, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isPrintWhenExpressionNull, isPrintWhenTrue, isRemoveLineWhenBlank, isReprinted, isToPrint, isValueRepeating, moveDependantElements, performDelayedEvaluation, registerTemplate, reset, setAlreadyPrinted, setBackcolor, setBand, setConditionalStylesContainer, setCurrentEvaluation, setForecolor, setHeight, setMode, setOriginProvider, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setPrintWhenExpressionNull, setPrintWhenTrue, setRelativeY, setRemoveLineWhenBlank, setReprinted, setShrinkable, setStretchHeight, setStretchType, setStyle, setStyleNameReference, setToPrint, setValueRepeating, setWidth, setX, setY, stretchElement, stretchHeightFinal, transferProperties, transferProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jasperreports.engine.JRElement
getElementGroup, getKey, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchTypeValue, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
 
Methods inherited from interface net.sf.jasperreports.engine.JRChild
clone
 
Methods inherited from interface net.sf.jasperreports.engine.JRCloneable
clone
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getHeight, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getWidth, setBackcolor, setForecolor, setMode
 
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleNameReference
 
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
 
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
 
Methods inherited from interface net.sf.jasperreports.engine.component.FillContext
getDefaultStyleProvider
 

Constructor Detail

JRFillComponentElement

public JRFillComponentElement(JRBaseFiller filler,
                              JRComponentElement element,
                              JRFillObjectFactory factory)

JRFillComponentElement

public JRFillComponentElement(JRFillComponentElement element,
                              JRFillCloneFactory factory)
Method Detail

evaluate

protected void evaluate(byte evaluation)
                 throws JRException
Specified by:
evaluate in class JRFillElement
Throws:
JRException

prepare

protected boolean prepare(int availableHeight,
                          boolean isOverflow)
                   throws JRException
Overrides:
prepare in class JRFillElement
Throws:
JRException

fill

protected JRPrintElement fill()
                       throws JRException
Specified by:
fill in class JRFillElement
Throws:
JRException

createElementTemplate

protected JRTemplateElement createElementTemplate()
Specified by:
createElementTemplate in class JRFillElement

resolveElement

protected void resolveElement(JRPrintElement element,
                              byte evaluation,
                              JREvaluationTime evaluationTime)
                       throws JRException
Description copied from class: JRFillElement
Resolves an element.

Overrides:
resolveElement in class JRFillElement
Parameters:
element - the element
evaluation - the evaluation type
evaluationTime - the current evaluation time
Throws:
JRException

resolveElement

protected void resolveElement(JRPrintElement element,
                              byte evaluation)
                       throws JRException
Description copied from class: JRFillElement
Resolves an element.

Specified by:
resolveElement in class JRFillElement
Parameters:
element - the element
evaluation - the evaluation type
Throws:
JRException

rewind

protected void rewind()
               throws JRException
Specified by:
rewind in class JRFillElement
Throws:
JRException

collectExpressions

public void collectExpressions(JRExpressionCollector collector)
Specified by:
collectExpressions in interface JRElement

visit

public void visit(JRVisitor visitor)
Specified by:
visit in interface JRVisitable

createClone

public JRFillCloneable createClone(JRFillCloneFactory factory)
Description copied from interface: JRFillCloneable
Creates a working clone of itself.

Specified by:
createClone in interface JRFillCloneable
Parameters:
factory - the clone factory to use while creating the clone
Returns:
a working clone of itself

getComponent

public Component getComponent()
Description copied from interface: JRComponentElement
Returns the component instance wrapped by this element.

Specified by:
getComponent in interface JRComponentElement
Returns:
the component instance

getComponentKey

public ComponentKey getComponentKey()
Description copied from interface: JRComponentElement
Returns the component type key for this element.

The component type key needs to be set in order to locate the component manager.

Specified by:
getComponentKey in interface JRComponentElement
Returns:
the component type key

evaluate

public java.lang.Object evaluate(JRExpression expression,
                                 byte evaluation)
                          throws JRException
Description copied from interface: FillContext
Evaluates an expression in the main report dataset.

Specified by:
evaluate in interface FillContext
Specified by:
evaluate in interface JRFillExpressionEvaluator
Parameters:
expression - the expression to evaluate
evaluation - the evaluation type; usually directly passed from FillComponent.evaluate(byte)
Returns:
the result of the evaluation
Throws:
JRException

getFillDataset

public JRFillDataset getFillDataset()
Description copied from interface: JRFillExpressionEvaluator
Returns the dataset used by the expression evaluator.

Specified by:
getFillDataset in interface JRFillExpressionEvaluator

getComponentElement

public JRComponentElement getComponentElement()
Description copied from interface: FillContext
Returns the component element that wraps the component.

Specified by:
getComponentElement in interface FillContext
Returns:
the current component element

getElementSourceId

public int getElementSourceId()
Description copied from interface: FillContext
Returns the fill element Id associated to the component element.

Specified by:
getElementSourceId in interface FillContext
Returns:
the Id of the component fill element
See Also:
JRPrintElement.getSourceElementId()

getElementOrigin

public JROrigin getElementOrigin()
Description copied from interface: FillContext
Returns the origin of the current component element.

Specified by:
getElementOrigin in interface FillContext
Overrides:
getElementOrigin in class JRFillElement
Returns:
the origin of the component element

getElementPrintY

public int getElementPrintY()
Description copied from interface: FillContext
Returns the position on the vertical axis where the component element starts printing.

Specified by:
getElementPrintY in interface FillContext
Returns:
the position on the vertical axis of the component element

getElementStyle

public JRStyle getElementStyle()
Description copied from interface: FillContext
Returns the current style of the component element.

Specified by:
getElementStyle in interface FillContext
Returns:
the current style of the component element

registerDelayedEvaluation

public void registerDelayedEvaluation(JRPrintElement printElement,
                                      EvaluationTimeEnum evaluationTime,
                                      java.lang.String evaluationGroup)
Description copied from interface: FillContext
Registers a delayed evaluation for a print element.

Specified by:
registerDelayedEvaluation in interface FillContext
Parameters:
printElement - the print element
evaluationTime - the delayed evaluation time; one of
evaluationGroup - the evaluation group name, if evaluationTime is EvaluationTimeEnum.GROUP
See Also:
FillComponent.evaluateDelayedElement(JRPrintElement, byte)

getReportLocale

public java.util.Locale getReportLocale()
Description copied from interface: FillContext
Returns the locale used to fill the current report.

Specified by:
getReportLocale in interface FillContext
Returns:
the report locale
See Also:
JRParameter.REPORT_LOCALE

getReportResourceBundle

public java.util.ResourceBundle getReportResourceBundle()
Description copied from interface: FillContext
Returns the resource bundle used for the current report.

Specified by:
getReportResourceBundle in interface FillContext
Returns:
the report resource bundle
See Also:
JRReport.getResourceBundle(), JRParameter.REPORT_RESOURCE_BUNDLE

getReportTimezone

public java.util.TimeZone getReportTimezone()
Description copied from interface: FillContext
Returns the time zone used to fill the current report.

Specified by:
getReportTimezone in interface FillContext
Returns:
the report time zone
See Also:
JRParameter.REPORT_TIME_ZONE

getFiller

public JRBaseFiller getFiller()
Description copied from interface: FillContext
Returns the filler object.

Specified by:
getFiller in interface FillContext
Returns:
the filler object


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com