Package com.helger.pdflayout.base
Interface IPLRenderableObject<IMPLTYPE extends IPLRenderableObject<IMPLTYPE>>
- Type Parameters:
IMPLTYPE- Implementation type
- All Superinterfaces:
com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>,com.helger.commons.id.IHasID<String>,IPLHasOutline,IPLObject<IMPLTYPE>,IPLVisitable
- All Known Subinterfaces:
IPLBlockElement<IMPLTYPE>,IPLElement<IMPLTYPE>,IPLHasHorizontalAlignment<IMPLTYPE>,IPLHasVerticalAlignment<IMPLTYPE>,IPLInlineElement<IMPLTYPE>
- All Known Implementing Classes:
AbstractPLBlockElement,AbstractPLBox,AbstractPLElement,AbstractPLExternalLink,AbstractPLHBox,AbstractPLImage,AbstractPLInlineBox,AbstractPLInlineElement,AbstractPLRenderableObject,AbstractPLText,AbstractPLVBox,PLBox,PLBulletPointList,PLExternalLink,PLHBox,PLImage,PLPageBreak,PLSpacerX,PLSpacerY,PLStreamImage,PLTable,PLTableCell,PLTableRow,PLText,PLVBox
public interface IPLRenderableObject<IMPLTYPE extends IPLRenderableObject<IMPLTYPE>>
extends IPLObject<IMPLTYPE>, IPLHasOutline
Base interface for a renderable PDF layout object.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiondefault com.helger.commons.state.EChangeCalled after the page was created but before the content stream is created.default floatGet the prepared size of the object.default floatdefault floatdefault floatbooleanprepare(PreparationContext aCtx) Prepare this element once for rendering.voidrender(PageRenderContext aCtx) Second step: perform.Methods inherited from interface com.helger.commons.traits.IGenericImplTrait
thisAsTMethods inherited from interface com.helger.commons.id.IHasID
getIDMethods inherited from interface com.helger.pdflayout.base.IPLHasOutline
getOutlineBottom, getOutlineLeft, getOutlineRight, getOutlineTop, getOutlineXSum, getOutlineYSumMethods inherited from interface com.helger.pdflayout.base.IPLObject
getAsSplittable, getDebugID, hasID, isVertSplittable, setBasicDataFromMethods inherited from interface com.helger.pdflayout.base.IPLVisitable
visit
-
Method Details
-
isPrepared
boolean isPrepared()- Returns:
trueif this object was already prepared,falseotherwise.
-
getPreparedSize
Get the prepared size of the object. This is the minimum space the content of the object needs given the available size constraints. This does NOT consider min- and max-size.- Returns:
- The prepared size or
nullif this object was not yet prepared. - See Also:
-
getPreparedWidth
default float getPreparedWidth()- Returns:
- The prepared width.
- See Also:
-
getPreparedHeight
default float getPreparedHeight()- Returns:
- The prepared height.
- See Also:
-
getRenderSize
- Returns:
- The render size or
nullif this object was not yet prepared. The render size includes the min/max size. - See Also:
-
getRenderWidth
default float getRenderWidth() -
getRenderHeight
default float getRenderHeight() -
prepare
Prepare this element once for rendering.- Parameters:
aCtx- The preparation context- Returns:
- The net size of the rendered object without margin, border and
margin. May not be
null. - See Also:
-
beforeRender
@Nonnull default com.helger.commons.state.EChange beforeRender(@Nonnull PagePreRenderContext aCtx) throws IOException Called after the page was created but before the content stream is created. This is e.g. used for images to create their XObjects upfront.- Parameters:
aCtx- The current page render context. Nevernull.- Returns:
EChange.CHANGEDif something changed. May not benull.- Throws:
IOException- In case of a PDFBox error
-
render
Second step: perform. This renders the previously prepared object to the PDF content stream present in the rendering context.- Parameters:
aCtx- Rendering context- Throws:
IOException- In case of a PDFBox error- See Also:
-