java.lang.Object | |
↳ | java.awt.Insets |
Known Direct Subclasses |
An Insets
object is a representation of the borders
of a container. It specifies the space that a container must leave
at each of its edges. The space can be a border, a blank space, or
a title.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
bottom | The inset from the bottom. | ||||||||||
left | The inset from the left. | ||||||||||
right | The inset from the right. | ||||||||||
top | The inset from the top. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates and initializes a new
Insets object with the
specified top, left, bottom, and right insets. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a copy of this object.
| |||||||||||
Checks whether two insets objects are equal.
| |||||||||||
Returns the hash code for this Insets.
| |||||||||||
Set top, left, bottom, and right to the specified values
| |||||||||||
Returns a string representation of this
Insets object. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The inset from the bottom. This value is subtracted from the Bottom of the rectangle to yield a new location for the Bottom.@serial
The inset from the left. This value is added to the Left of the rectangle to yield a new location for the Left edge.@serial
The inset from the right. This value is subtracted from the Right of the rectangle to yield a new location for the Right edge.@serial
The inset from the top. This value is added to the Top of the rectangle to yield a new location for the Top.@serial
Creates and initializes a new 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. |
Checks whether two insets objects are equal. Two instances
of Insets
are equal if the four integer values
of the fields top
, left
,
bottom
, and right
are all equal.
obj | the reference object with which to compare. |
---|
true
if the two insets are equal;
otherwise false
.Returns the hash code for this Insets.
Set top, left, bottom, and right to the specified values
top | the inset from the top. |
---|---|
left | the inset from the left. |
bottom | the inset from the bottom. |
right | the inset from the right. |
Returns a string representation of this 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
.
Insets
object.