public interface ReportElement
Interface for all report elements.
IMPORTANT: Although this interface is publicly visible, it is subject to change and may not be implemented by clients!
| Modifier and Type | Method and Description |
|---|---|
float |
getFirstSegmentHeight(float allowedWidth)
in case isSplitable is true, this method will be called.
|
float |
getHeight(float allowedWidth)
Height of this segment
|
float |
getHeightOfElementToSplit(float allowedWidth,
float allowedHeight)
For splittable elements returns the current height of the element that needs to be split.
|
java.util.Collection<ReportImage.ImagePrintIntent> |
getImageIntents()
Returns all the images that should have been printed by this element
|
boolean |
isSplitable()
In case the element may be split over pages, this method should return true
|
float |
print(org.apache.pdfbox.pdmodel.PDDocument document,
org.apache.pdfbox.pdmodel.PDPageContentStream stream,
int pageNumber,
float startX,
float startY,
float allowedWidth) |
ReportElement[] |
split(float allowedWidth)
If the element my be split this method should return two elements.
|
ReportElement[] |
split(float allowedWidth,
float allowedHeight)
Will split the report element, so the height of the first segment will the maximum value less or equal to the allowed height value.
|
float print(org.apache.pdfbox.pdmodel.PDDocument document,
org.apache.pdfbox.pdmodel.PDPageContentStream stream,
int pageNumber,
float startX,
float startY,
float allowedWidth)
throws java.io.IOException
document - PdfBox documentstream - PdfBox streampageNumber - current page number (0 based)startX - starting xstartY - starting yallowedWidth - maximal width of segmentjava.io.IOException - in case something happens during printingfloat getHeight(float allowedWidth)
allowedWidth - allowed with of the segmentboolean isSplitable()
float getFirstSegmentHeight(float allowedWidth)
allowedWidth - the maximum allowed width for this elementReportElement[] split(float allowedWidth)
allowedWidth - allowed with of the segmentReportElement[] split(float allowedWidth, float allowedHeight)
allowedWidth - width of report elementallowedHeight - max height of first segment.float getHeightOfElementToSplit(float allowedWidth,
float allowedHeight)
allowedWidth - width of report elementallowedHeight - max height of first segment.java.util.Collection<ReportImage.ImagePrintIntent> getImageIntents()