Package com.helger.pdflayout.spec
Class BorderStyleSpec
- java.lang.Object
-
- com.helger.pdflayout.spec.BorderStyleSpec
-
- All Implemented Interfaces:
Serializable
@Immutable @MustImplementEqualsAndHashcode public class BorderStyleSpec extends Object implements Serializable
This class contains the styling of a single border part. Currently only the color, the dash pattern and the line width can be set.- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ColorDEFAULT_COLORThe default border color: blackstatic LineDashPatternSpecDEFAULT_LINE_DASH_PATTERNThe default border style: solidstatic floatDEFAULT_LINE_WIDTHUse the default line width if unspecified.static BorderStyleSpecEMPTY
-
Constructor Summary
Constructors Constructor Description BorderStyleSpec()BorderStyleSpec(float fLineWidth)BorderStyleSpec(LineDashPatternSpec aLineDashPattern)BorderStyleSpec(Color aColor)BorderStyleSpec(Color aColor, float fLineWidth)BorderStyleSpec(Color aColor, LineDashPatternSpec aLineDashPattern)BorderStyleSpec(Color aColor, LineDashPatternSpec aLineDashPattern, float fLineWidth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)BorderStyleSpecgetCloneWithColor(Color aNewColor)BorderStyleSpecgetCloneWithLineDashPattern(LineDashPatternSpec aNewLineDashPattern)BorderStyleSpecgetCloneWithLineWidth(float fNewLineWidth)ColorgetColor()LineDashPatternSpecgetLineDashPattern()floatgetLineWidth()inthashCode()booleanisDefault()StringtoString()
-
-
-
Field Detail
-
DEFAULT_COLOR
public static final Color DEFAULT_COLOR
The default border color: black
-
DEFAULT_LINE_DASH_PATTERN
public static final LineDashPatternSpec DEFAULT_LINE_DASH_PATTERN
The default border style: solid
-
DEFAULT_LINE_WIDTH
public static final float DEFAULT_LINE_WIDTH
Use the default line width if unspecified. A width of 0 is also valid and would create a hair line- See Also:
- Constant Field Values
-
EMPTY
public static final BorderStyleSpec EMPTY
-
-
Constructor Detail
-
BorderStyleSpec
public BorderStyleSpec()
-
BorderStyleSpec
public BorderStyleSpec(@Nonnull LineDashPatternSpec aLineDashPattern)
-
BorderStyleSpec
public BorderStyleSpec(float fLineWidth)
-
BorderStyleSpec
public BorderStyleSpec(@Nonnull Color aColor, @Nonnull LineDashPatternSpec aLineDashPattern)
-
BorderStyleSpec
public BorderStyleSpec(@Nonnull Color aColor, @Nonnull LineDashPatternSpec aLineDashPattern, @Nonnegative float fLineWidth)
-
-
Method Detail
-
getLineDashPattern
@Nonnull public final LineDashPatternSpec getLineDashPattern()
- Returns:
- The border line style to use. Never
null.
-
getLineWidth
@Nonnegative public final float getLineWidth()
-
isDefault
public final boolean isDefault()
- Returns:
trueif all values are set to default,falseotherwise.
-
getCloneWithColor
@Nonnull public BorderStyleSpec getCloneWithColor(@Nonnull Color aNewColor)
-
getCloneWithLineDashPattern
@Nonnull public BorderStyleSpec getCloneWithLineDashPattern(@Nonnull LineDashPatternSpec aNewLineDashPattern)
-
getCloneWithLineWidth
@Nonnull public BorderStyleSpec getCloneWithLineWidth(float fNewLineWidth)
-
-