Interface IPLHasVerticalAlignment<IMPLTYPE extends IPLHasVerticalAlignment<IMPLTYPE>>

Type Parameters:
IMPLTYPE - Implementation type
All Superinterfaces:
com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>, com.helger.commons.id.IHasID<String>, IPLHasOutline, IPLObject<IMPLTYPE>, IPLRenderableObject<IMPLTYPE>, IPLVisitable
All Known Subinterfaces:
IPLBlockElement<IMPLTYPE>
All Known Implementing Classes:
AbstractPLBlockElement, AbstractPLBox, PLBox, PLTableCell

public interface IPLHasVerticalAlignment<IMPLTYPE extends IPLHasVerticalAlignment<IMPLTYPE>> extends IPLRenderableObject<IMPLTYPE>
Base interface for objects with a vertical alignment
Author:
Philip Helger
  • Field Details

    • DEFAULT_VERT_ALIGNMENT

      static final EVertAlignment DEFAULT_VERT_ALIGNMENT
  • Method Details

    • getVertAlign

      @Nonnull EVertAlignment getVertAlign()
      Returns:
      The vertical alignment of this element. By default it is EVertAlignment.DEFAULT. Never null. The vertical alignment may only be applied to contained children!
    • setVertAlign

      @Nonnull IMPLTYPE setVertAlign(@Nonnull EVertAlignment eVertAlign)
      Set the vertical alignment of this element. The vertical alignment may only be applied to contained children!
      Parameters:
      eVertAlign - The new vertical alignment. May not be null.
      Returns:
      this
    • getIndentY

      @Nonnegative default float getIndentY(float fAvailableHeight)
      Get the indentation for a certain vertical alignment. This method uses the prepared height as the basis for alignment.
      Parameters:
      fAvailableHeight - The available height of the surrounding element.
      Returns:
      The indentation offset. Always ≥ 0.
    • getIndentY

      @Nonnegative default float getIndentY(float fAvailableHeight, float fElementHeight)
      Get the indentation for a certain vertical alignment. This method uses the provided element height as the basis for alignment.
      Parameters:
      fAvailableHeight - The available height of the surrounding element. This is usually larger than fElementHeight.
      fElementHeight - The height of the element to align.
      Returns:
      The indentation offset. Always ≥ 0.