public class ReportElementStatic extends java.lang.Object implements ReportElement
IMPORTANT: Although this class is publicly visible, it is subject to change and may not be implemented by clients!
| Constructor and Description |
|---|
ReportElementStatic(ReportElement base,
int pageNo,
float x,
float y,
float width,
PositionOfStaticElements position) |
| Modifier and Type | Method and Description |
|---|---|
ReportElement |
getBase() |
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
|
int |
getPageNo() |
PositionOfStaticElements |
getPosition() |
float |
getWidth() |
float |
getX() |
float |
getY() |
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.
|
public ReportElementStatic(ReportElement base, int pageNo, float x, float y, float width, PositionOfStaticElements position)
base - ReportElement to be printedpageNo - 0-based number of page, where to print elementx - starting X coordinate of print locationy - starting Y coordinate of print locationwidth - the width of the static elementpublic ReportElement getBase()
public 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
print in interface ReportElementdocument - PdfBox documentstream - IGNOREDpageNumber - IGNORED (taken from constructor)startX - IGNORED (taken from constructor)startY - IGNORED (taken from constructor)allowedWidth - IGNORED (taken from constructor)java.io.IOException - in case something happens in the underlying pdf implementationpublic float getHeight(float allowedWidth)
ReportElementgetHeight in interface ReportElementallowedWidth - allowed with of the segmentpublic boolean isSplitable()
ReportElementisSplitable in interface ReportElementpublic float getFirstSegmentHeight(float allowedWidth)
ReportElementgetFirstSegmentHeight in interface ReportElementallowedWidth - the maximum allowed width for this elementpublic ReportElement[] split(float allowedWidth)
ReportElementsplit in interface ReportElementallowedWidth - allowed with of the segmentpublic ReportElement[] split(float allowedWidth, float allowedHeight)
ReportElementsplit in interface ReportElementallowedWidth - width of report elementallowedHeight - max height of first segment.public float getHeightOfElementToSplit(float allowedWidth,
float allowedHeight)
ReportElementgetHeightOfElementToSplit in interface ReportElementallowedWidth - width of report elementallowedHeight - max height of first segment.public java.util.Collection<ReportImage.ImagePrintIntent> getImageIntents()
ReportElementgetImageIntents in interface ReportElementpublic float getX()
public float getY()
public float getWidth()
public int getPageNo()
public PositionOfStaticElements getPosition()