Interface IPLSplittableObject<IMPLTYPE extends IPLSplittableObject<IMPLTYPE,?>,SPLITTYPE extends IPLSplittableObject<?,?>>

Type Parameters:
IMPLTYPE - Implementation type
SPLITTYPE - 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 Details

  • Method Details

    • 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:
      isVertSplittable in interface IPLObject<IMPLTYPE extends IPLSplittableObject<IMPLTYPE,?>>
      Returns:
      true if this element is vertically splittable, false otherwise. The default is DEFAULT_VERT_SPLITTABLE.
    • setVertSplittable

      @Nonnull IMPLTYPE setVertSplittable(boolean bVertSplittable)
      Change the vertical splitability of this object.
      Parameters:
      bVertSplittable - true if this element is splittable, false otherwise.
      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:
      null if splitting makes no sense.