public final class Insets2D
extends java.lang.Object
implements java.lang.Cloneable
Insets
which works on doubles
instead of intsModifier and Type | Field and Description |
---|---|
double |
bottom
The inset from the bottom.
|
double |
left
The inset from the left.
|
double |
right
The inset from the right.
|
double |
top
The inset from the top.
|
Constructor and Description |
---|
Insets2D(double top,
double left,
double bottom,
double right)
Creates and initializes a new
Insets object with the
specified top, left, bottom, and right insets. |
Modifier and Type | Method and Description |
---|---|
Insets2D |
clone()
Create a copy of this object.
|
boolean |
equals(java.lang.Object obj)
Checks whether two insets objects are equal.
|
int |
hashCode()
Returns the hash code for this Insets.
|
void |
set(double top,
double left,
double bottom,
double right)
Set top, left, bottom, and right to the specified values
|
java.lang.String |
toString()
Returns a string representation of this
Insets object. |
public double top
public double left
public double bottom
public double right
public Insets2D(double top, double left, double bottom, double right)
Insets
object with the
specified top, left, bottom, and right insets.top
- the inset from the top.left
- the inset from the left.bottom
- the inset from the bottom.right
- the inset from the right.public void set(double top, double left, double bottom, double right)
top
- the inset from the top.left
- the inset from the left.bottom
- the inset from the bottom.right
- the inset from the right.public boolean equals(java.lang.Object obj)
Insets
are equal if the four integer values
of the fields top
, left
,
bottom
, and right
are all equal.equals
in class java.lang.Object
true
if the two insets are equal;
otherwise false
.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
Insets
object.
This method is intended to be used only for debugging purposes, and
the content and format of the returned string may vary between
implementations. The returned string may be empty but may not be
null
.toString
in class java.lang.Object
Insets
object.public Insets2D clone()
clone
in class java.lang.Object
Insets2D
object.Copyright 2020 The Apache Software Foundation or its licensors, as applicable.