@@ -0,0 +1,1567 @@
+package cc.catalysts.boot.report.pdf.elements;%0A%0Aimport org.apache.pdfbox.pdmodel.PDDocument;%0Aimport org.apache.pdfbox.pdmodel.edit.PDPageContentStream;%0A%0Aimport java.io.IOException;%0Aimport java.util.ArrayList;%0Aimport java.util.Collection;%0Aimport java.util.LinkedList;%0Aimport java.util.List;%0A%0A/**%0A * Used to force elements to be rendered on the same page.%0A *%0A * Created by skaupper on 04.08.2016.%0A */%0Apublic class ReportCompositeElement extends AbstractReportElement %7B%0A%0A    private final List%3CReportElement%3E elements = new ArrayList%3C%3E();%0A    private Collection%3CReportImage.ImagePrintIntent%3E intents = new LinkedList%3CReportImage.ImagePrintIntent%3E();%0A%0A    public ReportCompositeElement addElement(ReportElement element) %7B%0A        elements.add(element);%0A        return this;%0A    %7D%0A%0A%0A    @Override%0A    public float print(PDDocument document, PDPageContentStream stream, int pageNumber, float startX, float startY, float allowedWidth) throws IOException %7B%0A        float lastY = startY;%0A        for (ReportElement element : elements) %7B%0A            lastY = element.print(document, stream, pageNumber, startX, lastY, allowedWidth);%0A            intents.addAll(element.getImageIntents());%0A        %7D%0A        return lastY;%0A    %7D%0A%0A    @Override%0A    public float getHeight(float allowedWidth) %7B%0A        float height = 0;%0A        for (ReportElement element : elements) %7B%0A            height += element.getHeight(allowedWidth);%0A        %7D%0A        return height;%0A    %7D%0A%0A    @Override%0A    public Collection%3CReportImage.ImagePrintIntent%3E getImageIntents() %7B%0A        return intents;%0A    %7D%0A%7D%0A

add ReportCompositeElement as a container class for ReportElements