public class CornerRadii extends Object
Modifier and Type | Field and Description |
---|---|
static CornerRadii |
EMPTY
A CornerRadii which is entirely empty, indicating squared corners.
|
Constructor and Description |
---|
CornerRadii(double radius)
Create a new CornerRadii with a single uniform radii value for all components of all
corners.
|
CornerRadii(double radius,
boolean asPercent)
Create a new CornerRadii with the given radii for each corner.
|
CornerRadii(double topLeft,
double topRight,
double bottomRight,
double bottomLeft,
boolean asPercent)
Create a new CornerRadii with uniform yet independent radii for each corner.
|
CornerRadii(double topLeftHorizontalRadius,
double topLeftVerticalRadius,
double topRightVerticalRadius,
double topRightHorizontalRadius,
double bottomRightHorizontalRadius,
double bottomRightVerticalRadius,
double bottomLeftVerticalRadius,
double bottomLeftHorizontalRadius,
boolean topLeftHorizontalRadiusAsPercent,
boolean topLeftVerticalRadiusAsPercent,
boolean topRightVerticalRadiusAsPercent,
boolean topRightHorizontalRadiusAsPercent,
boolean bottomRightHorizontalRadiusAsPercent,
boolean bottomRightVerticalRadiusAsPercent,
boolean bottomLeftVerticalRadiusAsPercent,
boolean bottomLeftHorizontalRadiusAsPercent)
Creates a new CornerRadii, allowing for specification of each component of each corner
radii and whether each component should be treated as a value or percentage.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
double |
getBottomLeftHorizontalRadius()
The length of the horizontal radii of the bottom-left corner.
|
double |
getBottomLeftVerticalRadius()
The length of the vertical radii of the bottom-left corner.
|
double |
getBottomRightHorizontalRadius()
The length of the horizontal radii of the bottom-right corner.
|
double |
getBottomRightVerticalRadius()
The length of the vertical radii of the bottom-right corner.
|
double |
getTopLeftHorizontalRadius()
The length of the horizontal radii of the top-left corner.
|
double |
getTopLeftVerticalRadius()
The length of the vertical radii of the top-left corner.
|
double |
getTopRightHorizontalRadius()
The length of the horizontal radii of the top-right corner.
|
double |
getTopRightVerticalRadius()
The length of the vertical radii of the top-right corner.
|
int |
hashCode() |
boolean |
isBottomLeftHorizontalRadiusAsPercentage()
indicates whether
bottomLeftHorizontalRadius is interpreted as a value or a percentage. |
boolean |
isBottomLeftVerticalRadiusAsPercentage()
indicates whether
bottomLeftVerticalRadius is interpreted as a value or a percentage. |
boolean |
isBottomRightHorizontalRadiusAsPercentage()
indicates whether
bottomRightHorizontalRadius is interpreted as a value or a percentage. |
boolean |
isBottomRightVerticalRadiusAsPercentage()
indicates whether
bottomRightVerticalRadius is interpreted as a value or a percentage. |
boolean |
isTopLeftHorizontalRadiusAsPercentage()
indicates whether
topLeftHorizontalRadius is interpreted as a value or a percentage. |
boolean |
isTopLeftVerticalRadiusAsPercentage()
indicates whether
topLeftVerticalRadius is interpreted as a value or a percentage. |
boolean |
isTopRightHorizontalRadiusAsPercentage()
indicates whether
topRightHorizontalRadius is interpreted as a value or a percentage. |
boolean |
isTopRightVerticalRadiusAsPercentage()
indicates whether
topRightVerticalRadius is interpreted as a value or a percentage. |
boolean |
isUniform()
Indicates whether each corner radius is exactly the same, and each are either uniformly percentage-based
or not.
|
String |
toString() |
public static final CornerRadii EMPTY
public CornerRadii(double radius)
radius
- The radii for each corner. Negative values are not allowed.public CornerRadii(double radius, boolean asPercent)
asPercent
argument.radius
- The radii for each corner. Negative values are not allowed.asPercent
- Whether the radii should be interpreted as a percentage.public CornerRadii(double topLeft, double topRight, double bottomRight, double bottomLeft, boolean asPercent)
topLeft
- The radii of the top-left corner. Negative numbers are not allowed.topRight
- The radii of the top-right corner. Negative numbers are not allowed.bottomRight
- The radii of the bottom-right corner. Negative numbers are not allowed.bottomLeft
- The radii of the bottom-left corner. Negative numbers are not allowed.asPercent
- Whether all four radii should be considered as values or percentagespublic CornerRadii(double topLeftHorizontalRadius, double topLeftVerticalRadius, double topRightVerticalRadius, double topRightHorizontalRadius, double bottomRightHorizontalRadius, double bottomRightVerticalRadius, double bottomLeftVerticalRadius, double bottomLeftHorizontalRadius, boolean topLeftHorizontalRadiusAsPercent, boolean topLeftVerticalRadiusAsPercent, boolean topRightVerticalRadiusAsPercent, boolean topRightHorizontalRadiusAsPercent, boolean bottomRightHorizontalRadiusAsPercent, boolean bottomRightVerticalRadiusAsPercent, boolean bottomLeftVerticalRadiusAsPercent, boolean bottomLeftHorizontalRadiusAsPercent)
topLeftHorizontalRadius
- topLeftVerticalRadius
- topRightVerticalRadius
- topRightHorizontalRadius
- bottomRightHorizontalRadius
- bottomRightVerticalRadius
- bottomLeftVerticalRadius
- bottomLeftHorizontalRadius
- topLeftHorizontalRadiusAsPercent
- topLeftVerticalRadiusAsPercent
- topRightVerticalRadiusAsPercent
- topRightHorizontalRadiusAsPercent
- bottomRightHorizontalRadiusAsPercent
- bottomRightVerticalRadiusAsPercent
- bottomLeftVerticalRadiusAsPercent
- bottomLeftHorizontalRadiusAsPercent
- public final double getTopLeftHorizontalRadius()
public final double getTopLeftVerticalRadius()
public final double getTopRightVerticalRadius()
public final double getTopRightHorizontalRadius()
public final double getBottomRightHorizontalRadius()
public final double getBottomRightVerticalRadius()
public final double getBottomLeftVerticalRadius()
public final double getBottomLeftHorizontalRadius()
public final boolean isTopLeftHorizontalRadiusAsPercentage()
topLeftHorizontalRadius
is interpreted as a value or a percentage.public final boolean isTopLeftVerticalRadiusAsPercentage()
topLeftVerticalRadius
is interpreted as a value or a percentage.public final boolean isTopRightVerticalRadiusAsPercentage()
topRightVerticalRadius
is interpreted as a value or a percentage.public final boolean isTopRightHorizontalRadiusAsPercentage()
topRightHorizontalRadius
is interpreted as a value or a percentage.public final boolean isBottomRightHorizontalRadiusAsPercentage()
bottomRightHorizontalRadius
is interpreted as a value or a percentage.public final boolean isBottomRightVerticalRadiusAsPercentage()
bottomRightVerticalRadius
is interpreted as a value or a percentage.public final boolean isBottomLeftVerticalRadiusAsPercentage()
bottomLeftVerticalRadius
is interpreted as a value or a percentage.public final boolean isBottomLeftHorizontalRadiusAsPercentage()
bottomLeftHorizontalRadius
is interpreted as a value or a percentage.public final boolean isUniform()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.