public final class BackgroundFill
extends java.lang.Object
Region
. Because BackgroundFill is an immutable object, it can safely be
used in any cache, and can safely be reused among multiple Regions or multiple
times in the same Region.
All BackgroundFills are drawn in order.
When applied to a Region with a defined shape, the corner radii are ignored.
Modifier and Type | Field and Description |
---|---|
(package private) Paint |
fill |
private int |
hash
A cached hash for improved performance on subsequent hash or
equality look ups.
|
(package private) Insets |
insets |
(package private) CornerRadii |
radii |
Constructor and Description |
---|
BackgroundFill(Paint fill,
CornerRadii radii,
Insets insets)
Creates a new BackgroundFill with the specified fill, radii, and
insets.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
Paint |
getFill()
The Paint to use for filling the background of the
Region . |
Insets |
getInsets()
The Insets to use for this fill.
|
CornerRadii |
getRadii()
The Radii to use for representing the four radii of the
BackgroundFill.
|
int |
hashCode() |
final Paint fill
final CornerRadii radii
final Insets insets
private final int hash
public BackgroundFill(Paint fill, CornerRadii radii, Insets insets)
fill
- Any Paint. If null, the value Color.TRANSPARENT is used.radii
- The corner Radii. If null, the value Radii.EMPTY is used.insets
- The insets. If null, the value Insets.EMPTY is used.public final Paint getFill()
Region
.
This value will never be null.Region
public final CornerRadii getRadii()
public final Insets getInsets()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object