Interface IPLHasBorder<IMPLTYPE extends IPLHasBorder<IMPLTYPE>>

Type Parameters:
IMPLTYPE - Implementation type
All Superinterfaces:
com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>, IPLHasOutline
All Known Subinterfaces:
IPLBlockElement<IMPLTYPE>, IPLElement<IMPLTYPE>, IPLHasMarginBorderPadding<IMPLTYPE>, IPLInlineElement<IMPLTYPE>
All Known Implementing Classes:
AbstractPLBlockElement, AbstractPLBox, AbstractPLElement, AbstractPLExternalLink, AbstractPLImage, AbstractPLInlineBox, AbstractPLInlineElement, AbstractPLText, PLBox, PLExternalLink, PLImage, PLMarginBorderPadding, PLPageSet, PLStreamImage, PLTableCell, PLText

public interface IPLHasBorder<IMPLTYPE extends IPLHasBorder<IMPLTYPE>> extends IPLHasOutline, com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>
Base interface for objects having a border
Author:
Philip Helger
  • Field Details

    • DEFAULT_BORDER

      static final BorderSpec DEFAULT_BORDER
      The default border is a 0 border, meaning no border at all.
  • Method Details

    • setBorder

      @Nonnull default IMPLTYPE setBorder(@Nonnull PLColor aColor)
      Set all border values (left, top, right, bottom) to the same value. This method may not be called after an element got prepared!
      Parameters:
      aColor - The color to use. May not be null.
      Returns:
      this
      Since:
      7.2.0
    • setBorder

      @Nonnull default IMPLTYPE setBorder(@Nullable BorderStyleSpec aBorder)
      Set all border values (left, top, right, bottom) to the same value. This method may not be called after an element got prepared!
      Parameters:
      aBorder - The border style specification to use. May be null to indicate no border.
      Returns:
      this
    • setBorder

      @Nonnull default IMPLTYPE setBorder(@Nullable BorderStyleSpec aBorderY, @Nullable BorderStyleSpec aBorderX)
      Set all border values. This method may not be called after an element got prepared!
      Parameters:
      aBorderY - The Y-value to use (for top and bottom). May be null to indicate no border.
      aBorderX - The X-value to use (for left and right). May be null to indicate no border.
      Returns:
      this
    • setBorder

      @Nonnull default IMPLTYPE setBorder(@Nullable BorderStyleSpec aBorderTop, @Nullable BorderStyleSpec aBorderRight, @Nullable BorderStyleSpec aBorderBottom, @Nullable BorderStyleSpec aBorderLeft)
      Set all border values to potentially different values. This method may not be called after an element got prepared!
      Parameters:
      aBorderTop - Top. May be null to indicate no border.
      aBorderRight - Right. May be null to indicate no border.
      aBorderBottom - Bottom. May be null to indicate no border.
      aBorderLeft - Left. May be null to indicate no border.
      Returns:
      this
    • setBorder

      @Nonnull IMPLTYPE setBorder(@Nonnull BorderSpec aBorder)
      Set the border values. This method may not be called after an element got prepared!
      Parameters:
      aBorder - Border to use. May not be null.
      Returns:
      this
    • setBorderTop

      @Nonnull default IMPLTYPE setBorderTop(@Nullable BorderStyleSpec aBorder)
      Set the top border value. This method may not be called after an element got prepared!
      Parameters:
      aBorder - The value to use. May be null.
      Returns:
      this
    • setBorderRight

      @Nonnull default IMPLTYPE setBorderRight(@Nullable BorderStyleSpec aBorder)
      Set the right border value. This method may not be called after an element got prepared!
      Parameters:
      aBorder - The value to use. May be null.
      Returns:
      this
    • setBorderBottom

      @Nonnull default IMPLTYPE setBorderBottom(@Nullable BorderStyleSpec aBorder)
      Set the bottom border value. This method may not be called after an element got prepared!
      Parameters:
      aBorder - The value to use. May be null.
      Returns:
      this
    • setBorderLeft

      @Nonnull default IMPLTYPE setBorderLeft(@Nullable BorderStyleSpec aBorder)
      Set the left border value. This method may not be called after an element got prepared!
      Parameters:
      aBorder - The value to use. May be null.
      Returns:
      this
    • setBorderX

      @Nonnull default IMPLTYPE setBorderX(@Nullable BorderStyleSpec aBorder)
      Set the left and right border value. This method may not be called after an element got prepared!
      Parameters:
      aBorder - The value to use. May be null.
      Returns:
      this
    • setBorderY

      @Nonnull default IMPLTYPE setBorderY(@Nullable BorderStyleSpec aBorder)
      Set the top and bottom border value. This method may not be called after an element got prepared!
      Parameters:
      aBorder - The value to use. May be null.
      Returns:
      this
    • getBorder

      @Nonnull BorderSpec getBorder()
      Returns:
      The current border. Never null.
    • getBorderTopWidth

      default float getBorderTopWidth()
      Returns:
      The current top border.
    • getBorderRightWidth

      default float getBorderRightWidth()
      Returns:
      The current right border.
    • getBorderBottomWidth

      default float getBorderBottomWidth()
      Returns:
      The current bottom border.
    • getBorderLeftWidth

      default float getBorderLeftWidth()
      Returns:
      The current left border.
    • getBorderXSumWidth

      default float getBorderXSumWidth()
      Returns:
      The sum of left and right border.
    • getBorderYSumWidth

      default float getBorderYSumWidth()
      Returns:
      The sum of top and bottom border.
    • getOutlineTop

      default float getOutlineTop()
      Specified by:
      getOutlineTop in interface IPLHasOutline
      Returns:
      margin top + border top + padding top.
    • getOutlineRight

      default float getOutlineRight()
      Specified by:
      getOutlineRight in interface IPLHasOutline
      Returns:
      margin right + border right + padding right.
    • getOutlineBottom

      default float getOutlineBottom()
      Specified by:
      getOutlineBottom in interface IPLHasOutline
      Returns:
      margin bottom + border bottom + padding bottom.
    • getOutlineLeft

      default float getOutlineLeft()
      Specified by:
      getOutlineLeft in interface IPLHasOutline
      Returns:
      margin left + border left + padding left.
    • getOutlineXSum

      default float getOutlineXSum()
      Description copied from interface: IPLHasOutline
      Sum of left and right outline
      Specified by:
      getOutlineXSum in interface IPLHasOutline
      Returns:
      IPLHasOutline.getOutlineLeft() + IPLHasOutline.getOutlineRight()
    • getOutlineYSum

      default float getOutlineYSum()
      Description copied from interface: IPLHasOutline
      Sum of top and bottom outline
      Specified by:
      getOutlineYSum in interface IPLHasOutline
      Returns:
      IPLHasOutline.getOutlineTop() + IPLHasOutline.getOutlineBottom()