Class PLPageBreak
java.lang.Object
com.helger.pdflayout.base.AbstractPLObject<IMPLTYPE>
com.helger.pdflayout.base.AbstractPLRenderableObject<PLPageBreak>
com.helger.pdflayout.element.special.PLPageBreak
- All Implemented Interfaces:
com.helger.commons.id.IHasID<String>,com.helger.commons.traits.IGenericImplTrait<PLPageBreak>,IPLHasOutline,IPLObject<PLPageBreak>,IPLRenderableObject<PLPageBreak>,IPLVisitable
A page break that ensures a new page is started afterwards. The difference
between force pages breaks and normal page breaks is as follows: forced page
breaks are always executed, whereas normal page breaks are not executed if a
new page just started.
Important note: page breaks are only handled if they are directly contained in a page set. Page breaks are not handled when nested in VBoxes or HBoxes.
Important note: page breaks are only handled if they are directly contained in a page set. Page breaks are not handled when nested in VBoxes or HBoxes.
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PLPageBreakfinal booleanprotected voidPL objects need to overwrite this method to reset their preparation state.protected SizeSpeconPrepare(PreparationContext aCtx) The abstract method that must be implemented by all subclasses.protected voidonRender(PageRenderContext aCtx) Abstract method to be implemented by subclasses.toString()Methods inherited from class com.helger.pdflayout.base.AbstractPLRenderableObject
getPrepareAvailableSize, getPreparedSize, getRenderSize, getRenderSize, internalCheckAlreadyPrepared, internalCheckNotPrepared, internalMarkAsNotPrepared, internalMarkAsNotPreparedDontPropagate, internalMarkAsPrepared, isPrepared, onRenderSizeChange, prepare, render, setBasicDataFrom, visitMethods inherited from class com.helger.pdflayout.base.AbstractPLObject
getDebugID, getID, onAfterSetID, setIDMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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, isVertSplittableMethods inherited from interface com.helger.pdflayout.base.IPLRenderableObject
beforeRender, getPreparedHeight, getPreparedWidth, getRenderHeight, getRenderWidth
-
Constructor Details
-
PLPageBreak
public PLPageBreak(boolean bForcePageBreak) Constructor- Parameters:
bForcePageBreak-trueif this is a forced page break,falseif it is a normal page break.
-
-
Method Details
-
isForcePageBreak
public final boolean isForcePageBreak()- Returns:
trueif this is a forced page break,falseif it is a normal page break.
-
onPrepare
Description copied from class:AbstractPLRenderableObjectThe abstract method that must be implemented by all subclasses. It is ensured that this method is called only once per instance!- Specified by:
onPreparein classAbstractPLRenderableObject<PLPageBreak>- Parameters:
aCtx- Preparation context. Nevernull.- Returns:
- The size of the rendered element without padding, border and
margin. May not be
null.
-
onMarkAsNotPrepared
protected void onMarkAsNotPrepared()Description copied from class:AbstractPLRenderableObjectPL objects need to overwrite this method to reset their preparation state. They also need to propagate this to their children!- Specified by:
onMarkAsNotPreparedin classAbstractPLRenderableObject<PLPageBreak>
-
onRender
Description copied from class:AbstractPLRenderableObjectAbstract method to be implemented by subclasses.- Specified by:
onRenderin classAbstractPLRenderableObject<PLPageBreak>- Parameters:
aCtx- Rendering context. Nevernull.- Throws:
IOException- In case of a PDFBox error
-
toString
- Overrides:
toStringin classAbstractPLRenderableObject<PLPageBreak>
-
createPreparedPageBreak
-