Package com.helger.pdflayout.base
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 Summary
Fields Modifier and Type Field Description static BorderSpecDEFAULT_BORDERThe default border is a 0 border, meaning no border at all.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description BorderSpecgetBorder()default floatgetBorderBottomWidth()default floatgetBorderLeftWidth()default floatgetBorderRightWidth()default floatgetBorderTopWidth()default floatgetBorderXSumWidth()default floatgetBorderYSumWidth()default floatgetOutlineBottom()default floatgetOutlineLeft()default floatgetOutlineRight()default floatgetOutlineTop()default floatgetOutlineXSum()Sum of left and right outlinedefault floatgetOutlineYSum()Sum of top and bottom outlineIMPLTYPEsetBorder(BorderSpec aBorder)Set the border values.default IMPLTYPEsetBorder(BorderStyleSpec aBorder)Set all border values (left, top, right, bottom) to the same value.default IMPLTYPEsetBorder(BorderStyleSpec aBorderY, BorderStyleSpec aBorderX)Set all border values.default IMPLTYPEsetBorder(BorderStyleSpec aBorderTop, BorderStyleSpec aBorderRight, BorderStyleSpec aBorderBottom, BorderStyleSpec aBorderLeft)Set all border values to potentially different values.default IMPLTYPEsetBorder(Color aColor)Set all border values (left, top, right, bottom) to the same value.default IMPLTYPEsetBorderBottom(BorderStyleSpec aBorder)Set the bottom border value.default IMPLTYPEsetBorderLeft(BorderStyleSpec aBorder)Set the left border value.default IMPLTYPEsetBorderRight(BorderStyleSpec aBorder)Set the right border value.default IMPLTYPEsetBorderTop(BorderStyleSpec aBorder)Set the top border value.default IMPLTYPEsetBorderX(BorderStyleSpec aBorder)Set the left and right border value.default IMPLTYPEsetBorderY(BorderStyleSpec aBorder)Set the top and bottom border value.
-
-
-
Field Detail
-
DEFAULT_BORDER
static final BorderSpec DEFAULT_BORDER
The default border is a 0 border, meaning no border at all.
-
-
Method Detail
-
setBorder
@Nonnull default IMPLTYPE setBorder(@Nonnull Color 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 benull.- Returns:
- this
-
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 benullto 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 benullto indicate no border.aBorderX- The X-value to use (for left and right). May benullto 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 benullto indicate no border.aBorderRight- Right. May benullto indicate no border.aBorderBottom- Bottom. May benullto indicate no border.aBorderLeft- Left. May benullto 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 benull.- 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 benull.- 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 benull.- 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 benull.- 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 benull.- 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 benull.- 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 benull.- 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:
getOutlineTopin interfaceIPLHasOutline- Returns:
- margin top + border top + padding top.
-
getOutlineRight
default float getOutlineRight()
- Specified by:
getOutlineRightin interfaceIPLHasOutline- Returns:
- margin right + border right + padding right.
-
getOutlineBottom
default float getOutlineBottom()
- Specified by:
getOutlineBottomin interfaceIPLHasOutline- Returns:
- margin bottom + border bottom + padding bottom.
-
getOutlineLeft
default float getOutlineLeft()
- Specified by:
getOutlineLeftin interfaceIPLHasOutline- Returns:
- margin left + border left + padding left.
-
getOutlineXSum
default float getOutlineXSum()
Description copied from interface:IPLHasOutlineSum of left and right outline- Specified by:
getOutlineXSumin interfaceIPLHasOutline- Returns:
IPLHasOutline.getOutlineLeft()+IPLHasOutline.getOutlineRight()
-
getOutlineYSum
default float getOutlineYSum()
Description copied from interface:IPLHasOutlineSum of top and bottom outline- Specified by:
getOutlineYSumin interfaceIPLHasOutline- Returns:
IPLHasOutline.getOutlineTop()+IPLHasOutline.getOutlineBottom()
-
-