Interface IPLElement<IMPLTYPE extends IPLElement<IMPLTYPE>>

Type Parameters:
IMPLTYPE - Implementation type
All Superinterfaces:
com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>, com.helger.commons.id.IHasID<String>, IPLHasBorder<IMPLTYPE>, IPLHasFillColor<IMPLTYPE>, IPLHasMargin<IMPLTYPE>, IPLHasMarginBorderPadding<IMPLTYPE>, IPLHasOutline, IPLHasPadding<IMPLTYPE>, IPLObject<IMPLTYPE>, IPLRenderableObject<IMPLTYPE>, IPLVisitable
All Known Subinterfaces:
IPLBlockElement<IMPLTYPE>, IPLInlineElement<IMPLTYPE>
All Known Implementing Classes:
AbstractPLBlockElement, AbstractPLBox, AbstractPLElement, AbstractPLExternalLink, AbstractPLImage, AbstractPLInlineBox, AbstractPLInlineElement, AbstractPLText, PLBox, PLExternalLink, PLImage, PLStreamImage, PLTableCell, PLText

public interface IPLElement<IMPLTYPE extends IPLElement<IMPLTYPE>> extends IPLRenderableObject<IMPLTYPE>, IPLHasMarginBorderPadding<IMPLTYPE>, IPLHasFillColor<IMPLTYPE>
Base interface for renderable objects having a margin, a border and a padding
Each object is self-responsible for handling its margin, border and padding!
Author:
Philip Helger
  • Field Details

    • DEFAULT_MIN_SIZE

      static final SizeSpec DEFAULT_MIN_SIZE
    • DEFAULT_MAX_SIZE

      static final SizeSpec DEFAULT_MAX_SIZE
  • Method Details

    • getMinSize

      @Nonnull SizeSpec getMinSize()
      Returns:
      The minimum size to be used. Excluding outline. Never null.
    • getMinWidth

      default float getMinWidth()
      Returns:
      The minimum width of the element.
    • getMinHeight

      default float getMinHeight()
      Returns:
      The minimum height of the element.
    • setMinSize

      @Nonnull default IMPLTYPE setMinSize(@Nonnegative float fMinWidth, @Nonnegative float fMinHeight)
      Set the minimum size to be used. Excluding outline.
      Parameters:
      fMinWidth - Minimum width. Must be ≥ 0.
      fMinHeight - Minimum height. Must be ≥ 0.
      Returns:
      this
    • setMinSize

      @Nonnull IMPLTYPE setMinSize(@Nonnull SizeSpec aMinSize)
      Set the minimum size to be used. Excluding outline.
      Parameters:
      aMinSize - Minimum size. May not be null.
      Returns:
      this
    • setMinWidth

      @Nonnull default IMPLTYPE setMinWidth(@Nonnegative float fMinWidth)
      Set the minimum width to be used. Excluding outline.
      Parameters:
      fMinWidth - Minimum width. Must be ≥ 0.
      Returns:
      this
    • setMinHeight

      @Nonnull default IMPLTYPE setMinHeight(@Nonnegative float fMinHeight)
      Set the minimum height to be used. Excluding outline.
      Parameters:
      fMinHeight - Minimum height. Must be ≥ 0.
      Returns:
      this
    • getMaxSize

      @Nonnull SizeSpec getMaxSize()
      Returns:
      The maximum size to be used. Excluding outline. Never null.
    • getMaxWidth

      default float getMaxWidth()
      Returns:
      The max width of the element.
    • getMaxHeight

      default float getMaxHeight()
      Returns:
      The maximum height of the element.
    • setMaxSize

      @Nonnull default IMPLTYPE setMaxSize(@Nonnegative float fMaxWidth, @Nonnegative float fMaxHeight)
      Set the maximum size to be used. Excluding outline.
      Parameters:
      fMaxWidth - Maximum width. Must be ≥ 0.
      fMaxHeight - Maximum height. Must be ≥ 0.
      Returns:
      this
    • setMaxSize

      @Nonnull IMPLTYPE setMaxSize(@Nonnull SizeSpec aMaxSize)
      Set the maximum size to be used. Excluding outline.
      Parameters:
      aMaxSize - Maximum size. May not be null. Must both be ≥ 0.
      Returns:
      this
    • setMaxWidth

      @Nonnull default IMPLTYPE setMaxWidth(@Nonnegative float fMaxWidth)
      Set the maximum width to be used. Excluding outline.
      Parameters:
      fMaxWidth - Maximum width. Must be ≥ 0.
      Returns:
      this
    • setMaxHeight

      @Nonnull default IMPLTYPE setMaxHeight(@Nonnegative float fMaxHeight)
      Set the maximum height to be used. Excluding outline.
      Parameters:
      fMaxHeight - Maximum height. Must be ≥ 0.
      Returns:
      this
    • setExactSize

      @Nonnull default IMPLTYPE setExactSize(@Nonnegative float fWidth, @Nonnegative float fHeight)
      Set the exact size to be used. Excluding outline. This is a shortcut for setting minimum and maximum size to the same values.
      Parameters:
      fWidth - Width to use. Must be ≥ 0.
      fHeight - Height to use. Must be ≥ 0.
      Returns:
      this
      See Also:
    • setExactWidth

      @Nonnull default IMPLTYPE setExactWidth(@Nonnegative float fWidth)
      Set the exact width to be used. Excluding outline. This is a shortcut for setting minimum and maximum width to the same values.
      Parameters:
      fWidth - Width to use. Must be ≥ 0.
      Returns:
      this
      See Also:
    • setExactHeight

      @Nonnull default IMPLTYPE setExactHeight(@Nonnegative float fHeight)
      Set the exact height to be used. Excluding outline. This is a shortcut for setting minimum and maximum height to the same values.
      Parameters:
      fHeight - Height to use. Must be ≥ 0.
      Returns:
      this
      See Also: