public abstract class Insets2D
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Insets2D.Double
The
Double class defines insets specified in
double precision. |
static class |
Insets2D.Float
The
Float class defines insets specified in
float precision. |
Modifier | Constructor and Description |
---|---|
protected |
Insets2D()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
add(double top,
double left,
double bottom,
double right)
Adds the specified insets to the current insets.
|
void |
add(Insets2D i)
Adds the specified insets to the current insets.
|
void |
addTo(java.awt.geom.Rectangle2D r)
Adds the current insets to the specified Rectangle2D making the
rectangle larger.
|
java.lang.Object |
clone()
Creates a new object of the same class as this object.
|
boolean |
equals(java.lang.Object obj)
Checks whether two insets objects are equal.
|
abstract double |
getBottom()
Returns the bottom insets in double precision.
|
abstract double |
getLeft()
Returns the left insets in double precision.
|
abstract double |
getRight()
Returns the right insets in double precision.
|
abstract double |
getTop()
Returns the top insets in double precision.
|
int |
hashCode()
Returns the hash code for this Insets2DDouble.
|
abstract void |
set(double top,
double left,
double bottom,
double right)
Sets the insets.
|
void |
set(Insets2D i)
Sets the insets.
|
void |
subtract(double top,
double left,
double bottom,
double right)
Subtracts the specified insets from the current insets.
|
void |
subtract(Insets2D i)
Subtracts the specified insets from the current insets.
|
void |
subtractTo(java.awt.geom.Rectangle2D r)
Subtracts the current insets to the specified Rectangle2D making the
rectangle smaller.
|
java.lang.String |
toString()
Returns a string representation of this
Insets object. |
public abstract double getTop()
Insets2D
.public abstract double getLeft()
Insets2D
.public abstract double getBottom()
Insets2D
.public abstract double getRight()
Insets2D
.public abstract void set(double top, double left, double bottom, double right)
top
- The top insets.left
- The left insets.bottom
- The bottom insets.right
- The right insets.public void set(Insets2D i)
i
- The new insets.public void add(double top, double left, double bottom, double right)
top
- The top insets.left
- The left insets.bottom
- The bottom insets.right
- The right insets.public void add(Insets2D i)
i
- The insets to be added.public void addTo(java.awt.geom.Rectangle2D r)
r
- The Rectangle2D.public void subtract(double top, double left, double bottom, double right)
top
- The top insets.left
- The left insets.bottom
- The bottom insets.right
- The right insets.public void subtract(Insets2D i)
i
- The insets to be subtracted.public void subtractTo(java.awt.geom.Rectangle2D r)
r
- The Rectangle2D.public boolean equals(java.lang.Object obj)
Insets2DDouble
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.Object clone()
clone
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.