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
FieldsModifier and TypeFieldDescriptionstatic final BorderSpecThe default border is a 0 border, meaning no border at all. -
Method Summary
Modifier and TypeMethodDescriptiondefault floatdefault floatdefault floatdefault floatdefault floatdefault floatdefault floatdefault floatdefault floatdefault floatdefault floatSum of left and right outlinedefault floatSum of top and bottom outlinedefault IMPLTYPESet all border values (left, top, right, bottom) to the same value.setBorder(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 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.Methods inherited from interface com.helger.commons.traits.IGenericImplTrait
thisAsT
-
Field Details
-
DEFAULT_BORDER
The default border is a 0 border, meaning no border at all.
-
-
Method Details
-
setBorder
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
- Since:
- 7.2.0
-
setBorder
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
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
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
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
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
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
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
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
- 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()
-