public class Insets
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private double |
bottom |
static Insets |
EMPTY
Empty insets.
|
private int |
hash
The cached hash code, used to improve performance in situations where
we cache gradients, such as in the CSS routines.
|
private double |
left |
private double |
right |
private double |
top |
Constructor and Description |
---|
Insets(double topRightBottomLeft)
Constructs a new Insets instance with same value for all four offsets.
|
Insets(double top,
double right,
double bottom,
double left)
Constructs a new Insets instance with four different offsets.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
double |
getBottom()
The inset on the bottom side
|
double |
getLeft()
The inset on the left side
|
double |
getRight()
The inset on the right side
|
double |
getTop()
The inset on the top side
|
int |
hashCode()
Returns a hash code value for the insets.
|
java.lang.String |
toString()
Returns a string representation for the insets.
|
public static final Insets EMPTY
Insets
instance with all offsets equal to zero.private double top
private double right
private double bottom
private double left
private int hash
public Insets(double top, double right, double bottom, double left)
top
- the top offsetright
- the right offsetbottom
- the bottom offsetleft
- the left offsetpublic Insets(double topRightBottomLeft)
topRightBottomLeft
- the value used for top, bottom, right and left
offsetpublic final double getTop()
public final double getRight()
public final double getBottom()
public final double getLeft()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the reference object with which to comparepublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object