Spec-Zone .ru
спецификации, руководства, описания, API
|
public final class BorderWidths extends java.lang.Object
topAsPercentage
, rightAsPercentage
, bottomAsPercentage
,
leftAsPercentage
. The only allowable negative value for top, right,
bottom, and left is AUTO
.
Because the BorderWidths is immutable, it can safely be used in any
cache, and can safely be reused among multiple Regions.Modifier and Type | Field and Description |
---|---|
static double |
AUTO
When used by a BorderStroke, the value of AUTO is interpreted as the
value of
BorderStroke.MEDIUM for the corresponding side. |
static BorderWidths |
DEFAULT
The default BorderWidths that is used by a BorderImage when null is specified.
|
static BorderWidths |
EMPTY
An empty set of widths, such that all values are 0 and are literal values.
|
static BorderWidths |
FULL
A set of widths representing 100% on each side.
|
Constructor and Description |
---|
BorderWidths(double width)
Creates a new BorderWidths using the given width for all four borders,
and treating this width as a literal value, and not a percentage.
|
BorderWidths(double top,
double right,
double bottom,
double left)
Creates a new BorderWidths with the specified widths for top, right,
bottom, and left.
|
BorderWidths(double top,
double right,
double bottom,
double left,
boolean topAsPercentage,
boolean rightAsPercentage,
boolean bottomAsPercentage,
boolean leftAsPercentage)
Creates a new BorderWidths.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
double |
getBottom() |
double |
getLeft() |
double |
getRight() |
double |
getTop() |
int |
hashCode() |
boolean |
isBottomAsPercentage() |
boolean |
isLeftAsPercentage() |
boolean |
isRightAsPercentage() |
boolean |
isTopAsPercentage() |
public static final double AUTO
BorderStroke.MEDIUM
for the corresponding side. When
used with a BorderImage, the value of AUTO means to read the corresponding
value from the BorderStroke(s), and not to specify it manually.public static final BorderWidths DEFAULT
public static final BorderWidths EMPTY
public static final BorderWidths FULL
public BorderWidths(double width)
width
- The border width. This cannot be negative.public BorderWidths(double top, double right, double bottom, double left)
top
- The thickness of the border on the top. Must be non-negative.right
- The thickness of the border on the right. Must be non-negative.bottom
- The thickness of the border on the bottom. Must be non-negative.left
- The thickness of the border on the left. Must be non-negative.public BorderWidths(double top, double right, double bottom, double left, boolean topAsPercentage, boolean rightAsPercentage, boolean bottomAsPercentage, boolean leftAsPercentage)
top
, right
, bottom
,
or left
can be non-negative.top
- The thickness of the border on the top. Must be non-negative.right
- The thickness of the border on the right. Must be non-negative.bottom
- The thickness of the border on the bottom. Must be non-negative.left
- The thickness of the border on the left. Must be non-negative.topAsPercentage
- Whether the top should be treated as a percentage.rightAsPercentage
- Whether the right should be treated as a percentage.bottomAsPercentage
- Whether the bottom should be treated as a percentage.leftAsPercentage
- Whether the left should be treated as a percentage.public final double getTop()
public final double getRight()
public final double getBottom()
public final double getLeft()
public final boolean isTopAsPercentage()
public final boolean isRightAsPercentage()
public final boolean isBottomAsPercentage()
public final boolean isLeftAsPercentage()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. Use is subject to