Class PLBulletPointList
java.lang.Object
com.helger.pdflayout.base.AbstractPLObject<IMPLTYPE>
com.helger.pdflayout.base.AbstractPLRenderableObject<PLBulletPointList>
com.helger.pdflayout.element.list.PLBulletPointList
- All Implemented Interfaces:
com.helger.commons.id.IHasID<String>,com.helger.commons.traits.IGenericImplTrait<PLBulletPointList>,IPLHasOutline,IPLObject<PLBulletPointList>,IPLRenderableObject<PLBulletPointList>,IPLSplittableObject<PLBulletPointList,,PLTable> IPLVisitable
public class PLBulletPointList
extends AbstractPLRenderableObject<PLBulletPointList>
implements IPLSplittableObject<PLBulletPointList,PLTable>
A simple bullet point list.
- Since:
- 5.1.0
- Author:
- Philip Helger
-
Field Summary
Fields inherited from interface com.helger.pdflayout.base.IPLSplittableObject
DEFAULT_VERT_SPLITTABLE -
Constructor Summary
ConstructorsConstructorDescriptionPLBulletPointList(WidthSpec aWidthSpec, IBulletPointCreator aBulletPointCreator) -
Method Summary
Modifier and TypeMethodDescriptionaddBulletPoint(IPLRenderableObject<?> aElement) final IBulletPointCreatorfinal PLTableCreate a new object of the same type as this object.final 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.final PLBulletPointListsetVertSplittable(boolean bVertSplittable) Change the vertical splitability of this object.final PLSplitResultsplitElementVert(float fAvailableWidth, float fAvailableHeight) Split this element vertically into sub-elements according to the available height.Methods inherited from class com.helger.pdflayout.base.AbstractPLRenderableObject
getPrepareAvailableSize, getPreparedSize, getRenderSize, getRenderSize, internalCheckAlreadyPrepared, internalCheckNotPrepared, internalMarkAsNotPrepared, internalMarkAsNotPreparedDontPropagate, internalMarkAsPrepared, isPrepared, onRenderSizeChange, prepare, render, setBasicDataFrom, toString, 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, setBasicDataFromMethods inherited from interface com.helger.pdflayout.base.IPLRenderableObject
beforeRender, getPreparedHeight, getPreparedWidth, getRenderHeight, getRenderWidthMethods inherited from interface com.helger.pdflayout.base.IPLVisitable
visit
-
Constructor Details
-
PLBulletPointList
public PLBulletPointList(@Nonnull WidthSpec aWidthSpec, @Nonnull IBulletPointCreator aBulletPointCreator)
-
-
Method Details
-
getUnderlyingTable
-
getBulletPointCreator
-
addBulletPoint
-
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<PLBulletPointList>- 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<PLBulletPointList>
-
onRender
Description copied from class:AbstractPLRenderableObjectAbstract method to be implemented by subclasses.- Specified by:
onRenderin classAbstractPLRenderableObject<PLBulletPointList>- Parameters:
aCtx- Rendering context. Nevernull.- Throws:
IOException- In case of a PDFBox error
-
internalCreateNewVertSplitObject
Description copied from interface:IPLSplittableObjectCreate a new object of the same type as this object.- Specified by:
internalCreateNewVertSplitObjectin interfaceIPLSplittableObject<PLBulletPointList,PLTable> - Parameters:
aBase- The source object to copy data from.- Returns:
- Never
null.
-
isVertSplittable
public final boolean isVertSplittable()- Specified by:
isVertSplittablein interfaceIPLObject<PLBulletPointList>- Specified by:
isVertSplittablein interfaceIPLSplittableObject<PLBulletPointList,PLTable> - Returns:
trueif this element is vertically splittable,falseotherwise. The default isIPLSplittableObject.DEFAULT_VERT_SPLITTABLE.
-
setVertSplittable
Description copied from interface:IPLSplittableObjectChange the vertical splitability of this object.- Specified by:
setVertSplittablein interfaceIPLSplittableObject<PLBulletPointList,PLTable> - Parameters:
bVertSplittable-trueif this element is splittable,falseotherwise.- Returns:
- this for chaining
-
splitElementVert
@Nullable public final PLSplitResult splitElementVert(@Nonnegative float fAvailableWidth, @Nonnegative float fAvailableHeight) Description copied from interface:IPLSplittableObjectSplit this element vertically into sub-elements according to the available height. Splitting is always done after preparation and must return prepared objects!- Specified by:
splitElementVertin interfaceIPLSplittableObject<PLBulletPointList,PLTable> - Parameters:
fAvailableWidth- The available width without outline of the element.fAvailableHeight- The available height without outline of this element. Must be ≥ 0.- Returns:
nullif splitting makes no sense.
-