Modifier and Type | Field and Description |
---|---|
double |
bottom
Gets the bottom inset.
|
static InsetsD |
EMPTY
The "empty" insets that has all properties set to
0.0d . |
double |
left
Gets the left inset.
|
double |
right
Gets the right inset.
|
double |
top
Gets the top inset.
|
Constructor and Description |
---|
InsetsD() |
InsetsD(double inset)
Initializes a new instance using the provided inset for all four sides.
|
InsetsD(double top,
double right,
double bottom,
double left)
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
InsetsD |
createUnion(InsetsD insets)
Calculates the union of this instance and the given inset which is done by performing
Math.max(double, double)
on all four inset values. |
static boolean |
equals(InsetsD one,
InsetsD two)
|
boolean |
equals(Object other)
Indicates whether this instance and a specified object are equal.
|
static InsetsD |
fromLTRB(double left,
double top,
double right,
double bottom)
Initializes a new instance.
|
double |
getBottom()
Gets the bottom inset.
|
InsetsD |
getEnlarged(InsetsD insets)
Creates an enlarged instance by adding the insets of the specified insets to this instance and returning the result.
|
double |
getHorizontalInsets()
|
double |
getLeft()
Gets the left inset.
|
double |
getRight()
Gets the right inset.
|
double |
getTop()
Gets the top inset.
|
double |
getVerticalInsets()
|
int |
hashCode()
Returns the hash code for this instance.
|
boolean |
isEmpty()
Gets a value indicating whether this instance is empty, that is all insets are
0.0d . |
String |
toString()
Returns a
String that represents this instance. |
public final double bottom
public static final InsetsD EMPTY
0.0d
.public final double left
public final double right
public final double top
public InsetsD()
public InsetsD(double inset)
inset
- The inset to use for all sides.public InsetsD(double top, double right, double bottom, double left)
top
- The top inset.right
- The right inset.bottom
- The bottom inset.left
- The left inset.public final InsetsD createUnion(InsetsD insets)
Math.max(double, double)
on all four inset values.insets
- The insets to max with these insets.public boolean equals(Object other)
public static final InsetsD fromLTRB(double left, double top, double right, double bottom)
left
- The left inset.top
- The top inset.right
- The right inset.bottom
- The bottom inset.public final double getBottom()
public final InsetsD getEnlarged(InsetsD insets)
insets
- The insets to add to this instance.public final double getHorizontalInsets()
public final double getLeft()
public final double getRight()
public final double getTop()
public final double getVerticalInsets()
public int hashCode()
public final boolean isEmpty()
0.0d
.true
if this instance has all properties set to 0.0d
; false
otherwise.