@Immutable @MustImplementEqualsAndHashcode public class BorderSpec extends Object
| Modifier and Type | Field and Description |
|---|---|
static BorderSpec |
BORDER0
Represents no border at all!
|
| Constructor and Description |
|---|
BorderSpec(BorderStyleSpec aBorder)
Constructor.
|
BorderSpec(BorderStyleSpec aBorderY,
BorderStyleSpec aBorderX)
Constructor.
|
BorderSpec(BorderStyleSpec aBorderTop,
BorderStyleSpec aBorderRight,
BorderStyleSpec aBorderBottom,
BorderStyleSpec aBorderLeft)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
areAllBordersEqual() |
boolean |
equals(Object o) |
BorderStyleSpec |
getBottom() |
float |
getBottomWidth() |
BorderSpec |
getCloneWithBottom(BorderStyleSpec aBottom) |
BorderSpec |
getCloneWithLeft(BorderStyleSpec aLeft) |
BorderSpec |
getCloneWithRight(BorderStyleSpec aRight) |
BorderSpec |
getCloneWithTop(BorderStyleSpec aTop) |
BorderStyleSpec |
getLeft() |
float |
getLeftWidth() |
BorderStyleSpec |
getRight() |
float |
getRightWidth() |
BorderStyleSpec |
getTop() |
float |
getTopWidth() |
float |
getXSumWidth() |
float |
getYSumWidth() |
boolean |
hasAllBorders() |
boolean |
hasAnyBorder() |
int |
hashCode() |
String |
toString() |
public static final BorderSpec BORDER0
public BorderSpec(@Nullable BorderStyleSpec aBorder)
aBorder - The border to set for all sides (left, top, right, bottom). Maybe
null.public BorderSpec(@Nullable BorderStyleSpec aBorderY, @Nullable BorderStyleSpec aBorderX)
aBorderY - The border to set for top and bottom. Maybe null.aBorderX - The border to set for left and right. Maybe null.public BorderSpec(@Nullable BorderStyleSpec aBorderTop, @Nullable BorderStyleSpec aBorderRight, @Nullable BorderStyleSpec aBorderBottom, @Nullable BorderStyleSpec aBorderLeft)
aBorderTop - The border to set for top. Maybe null.aBorderRight - The border to set for right. Maybe null.aBorderBottom - The border to set for bottom. Maybe null.aBorderLeft - The border to set for left. Maybe null.public boolean hasAllBorders()
true if all borders are defined, false
otherwise.public boolean hasAnyBorder()
true if at least one border is defined,
false if no border is defined at all.public boolean areAllBordersEqual()
true if all border sides are equal. This is
true for null borders as well as for
defined borders.@Nullable public BorderStyleSpec getTop()
null.@Nullable public BorderStyleSpec getRight()
null.@Nullable public BorderStyleSpec getBottom()
null.@Nullable public BorderStyleSpec getLeft()
null.public float getTopWidth()
public float getRightWidth()
public float getBottomWidth()
public float getLeftWidth()
public float getXSumWidth()
public float getYSumWidth()
@Nonnull public BorderSpec getCloneWithTop(@Nullable BorderStyleSpec aTop)
@Nonnull public BorderSpec getCloneWithRight(@Nullable BorderStyleSpec aRight)
@Nonnull public BorderSpec getCloneWithBottom(@Nullable BorderStyleSpec aBottom)
@Nonnull public BorderSpec getCloneWithLeft(@Nullable BorderStyleSpec aLeft)
Copyright © 2014–2016 Philip Helger. All rights reserved.