Interface FillComponent

All Known Implementing Classes:
BarbecueFillComponent, BarcodeFillComponent, BaseFillComponent, BaseFillList, FillSpiderChart, FillTable, HorizontalFillList, IconLabelComponentFill, SubreportFillComponent, VerticalFillList

public interface FillComponent
A component handler used while filling the report.

The fill component implementation is responsible for managing a component at fill time. A typical implementation would evaluate a set of expressions and create a print element to be included in the generated report.

Author:
Lucian Chirita (lucianc@users.sourceforge.net)
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    evaluate(byte evaluation)
    Evaluates the fill component.
    void
    evaluateDelayedElement(JRPrintElement element, byte evaluation)
    Perform delayed evaluations and fill the print element with the resulting data.
    Fills the component by creating a print element which will be included in the generated report.
    void
    initialize(FillContext fillContext)
    Initializes the fill component with the fill context.
    prepare(int availableHeight)
    Deprecated.
    prepare(int availableHeight, boolean isOverflowAllowed)
    Prepares to fill the component by deciding whether the component will print, and how much vertical space it will require.
    void
    Rewinds the component.
  • Method Details

    • initialize

      void initialize(FillContext fillContext)
      Initializes the fill component with the fill context.

      This method is called before the fill component is used.

      Parameters:
      fillContext - the fill context
    • evaluate

      void evaluate(byte evaluation) throws JRException
      Evaluates the fill component.

      This method would evaluate the component expressions and store the results to be used in fill().

      If the component needs to delay the evaluation of some of its expressions, it would call FillContext.registerDelayedEvaluation(JRPrintElement, EvaluationTimeEnum, String) to register a delayed evaluation print element, and perform the delayed evaluations on evaluateDelayedElement(JRPrintElement, byte).

      Parameters:
      evaluation - the evaluation type
      Throws:
      JRException
      See Also:
    • prepare

      FillPrepareResult prepare(int availableHeight)
      Deprecated.
    • prepare

      default FillPrepareResult prepare(int availableHeight, boolean isOverflowAllowed)
      Prepares to fill the component by deciding whether the component will print, and how much vertical space it will require.
      Parameters:
      availableHeight - the amount of vertical space available for the component, starting from the top of the component element.
      isOverflowAllowed - flag indicating if overflow is allowed for the component.
      Returns:
      the result of the preparation, which specifies whether the component will print and how much it will stretch vertically.
    • fill

      Fills the component by creating a print element which will be included in the generated report.

      This method will get called only if prepare(int) returned a result that indicated that the component will print.

      Returns:
      the print element generated by the component
    • rewind

      void rewind()
      Rewinds the component.

      This method is called when filling the component has been canceled and is about to be restarted. The component needs to reset its state (if any) to initial values.

    • evaluateDelayedElement

      void evaluateDelayedElement(JRPrintElement element, byte evaluation) throws JRException
      Perform delayed evaluations and fill the print element with the resulting data.
      Parameters:
      element - the print element for which delayed evaluation has been registered
      evaluation - the evaluation type
      Throws:
      JRException
      See Also: