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 -
Method Summary
Modifier and TypeMethodDescriptionCreate a new object of the same type as this object.booleansetVertSplittable(boolean bVertSplittable) Change the vertical splitability of this object.splitElementVert(float fAvailableWidth, float fAvailableHeight) Split this element vertically into sub-elements according to the available height.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.IPLObject
getAsSplittable, getDebugID, hasID, setBasicDataFromMethods inherited from interface com.helger.pdflayout.base.IPLVisitable
visit
-
Field Details
-
DEFAULT_VERT_SPLITTABLE
static final boolean DEFAULT_VERT_SPLITTABLE- See Also:
-
-
Method Details
-
internalCreateNewVertSplitObject
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
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.
-