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
Constructors Constructor Description PLBulletPointList(WidthSpec aWidthSpec, IBulletPointCreator aBulletPointCreator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PLBulletPointListaddBulletPoint(IPLRenderableObject<?> aElement)IBulletPointCreatorgetBulletPointCreator()PLTablegetUnderlyingTable()PLTableinternalCreateNewVertSplitObject(PLTable aBase)Create a new object of the same type as this object.booleanisVertSplittable()protected voidonMarkAsNotPrepared()PL 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.PLBulletPointListsetVertSplittable(boolean bVertSplittable)Change the vertical splitability of this object.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, visit
-
Methods inherited from class com.helger.pdflayout.base.AbstractPLObject
getDebugID, getID, onAfterSetID, setID
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.pdflayout.base.IPLHasOutline
getOutlineBottom, getOutlineLeft, getOutlineRight, getOutlineTop, getOutlineXSum, getOutlineYSum
-
Methods inherited from interface com.helger.pdflayout.base.IPLObject
getAsSplittable, getDebugID, hasID, setBasicDataFrom
-
Methods inherited from interface com.helger.pdflayout.base.IPLRenderableObject
beforeRender, getPreparedHeight, getPreparedWidth, getRenderHeight, getRenderWidth
-
Methods inherited from interface com.helger.pdflayout.base.IPLVisitable
visit
-
-
-
-
Constructor Detail
-
PLBulletPointList
public PLBulletPointList(@Nonnull WidthSpec aWidthSpec, @Nonnull IBulletPointCreator aBulletPointCreator)
-
-
Method Detail
-
getBulletPointCreator
@Nonnull public final IBulletPointCreator getBulletPointCreator()
-
addBulletPoint
@Nonnull public PLBulletPointList addBulletPoint(@Nonnull IPLRenderableObject<?> aElement)
-
onPrepare
protected SizeSpec onPrepare(PreparationContext aCtx)
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
protected void onRender(PageRenderContext aCtx) throws IOException
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
@Nonnull public PLTable internalCreateNewVertSplitObject(@Nonnull PLTable aBase)
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
@Nonnull public final PLBulletPointList setVertSplittable(boolean bVertSplittable)
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.
-
-