Class 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 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
      • 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
      • deduplicate

        protected <T extends Deduplicable> T deduplicate​(T object)
        Deduplicates an object by looking for an identical one that's already present in the fill context. This operations should be performed on element templates in 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