Package com.helger.pdflayout.base
Interface IPLSplittableObject<IMPLTYPE extends IPLSplittableObject<IMPLTYPE,?>,SPLITTYPE extends IPLSplittableObject<?,?>>
-
- Type Parameters:
IMPLTYPE- Implementation typeSPLITTYPE- Type to be split
- All Superinterfaces:
com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>,com.helger.commons.id.IHasID<String>,IPLObject<IMPLTYPE>,IPLVisitable
- All Known Implementing Classes:
AbstractPLBox,AbstractPLExternalLink,AbstractPLHBox,AbstractPLInlineBox,AbstractPLText,AbstractPLVBox,PLBox,PLBulletPointList,PLExternalLink,PLHBox,PLTable,PLTableCell,PLTableRow,PLText,PLVBox
public interface IPLSplittableObject<IMPLTYPE extends IPLSplittableObject<IMPLTYPE,?>,SPLITTYPE extends IPLSplittableObject<?,?>> extends IPLObject<IMPLTYPE>
Base interface for a splittable element- Author:
- Philip Helger
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_VERT_SPLITTABLE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SPLITTYPEinternalCreateNewVertSplitObject(SPLITTYPE aBase)Create a new object of the same type as this object.booleanisVertSplittable()IMPLTYPEsetVertSplittable(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 interface com.helger.pdflayout.base.IPLObject
getAsSplittable, getDebugID, hasID, setBasicDataFrom
-
Methods inherited from interface com.helger.pdflayout.base.IPLVisitable
visit
-
-
-
-
Field Detail
-
DEFAULT_VERT_SPLITTABLE
static final boolean DEFAULT_VERT_SPLITTABLE
- See Also:
- Constant Field Values
-
-
Method Detail
-
internalCreateNewVertSplitObject
@Nonnull SPLITTYPE internalCreateNewVertSplitObject(@Nonnull SPLITTYPE aBase)
Create a new object of the same type as this object.- Parameters:
aBase- The source object to copy data from.- Returns:
- Never
null.
-
isVertSplittable
boolean isVertSplittable()
- Specified by:
isVertSplittablein interfaceIPLObject<IMPLTYPE extends IPLSplittableObject<IMPLTYPE,?>>- Returns:
trueif this element is vertically splittable,falseotherwise. The default isDEFAULT_VERT_SPLITTABLE.
-
setVertSplittable
@Nonnull IMPLTYPE setVertSplittable(boolean bVertSplittable)
Change the vertical splitability of this object.- Parameters:
bVertSplittable-trueif this element is splittable,falseotherwise.- Returns:
- this for chaining
-
splitElementVert
@Nullable PLSplitResult splitElementVert(@Nonnegative float fAvailableWidth, @Nonnegative float fAvailableHeight)
Split this element vertically into sub-elements according to the available height. Splitting is always done after preparation and must return prepared objects!- 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.
-
-