Serializable
, Cloneable
InsetsUIResource
public class Insets extends Object implements Cloneable, Serializable
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.Modifier and Type | Field | Description |
---|---|---|
int |
bottom |
The inset from the bottom. |
int |
left |
The inset from the left. |
int |
right |
The inset from the right. |
int |
top |
The inset from the top. |
Constructor | Description |
---|---|
Insets |
Creates and initializes a new Insets object with the specified top, left, bottom, and right insets. |
Modifier and Type | Method | Description |
---|---|---|
Object |
clone() |
Create a copy of this object. |
boolean |
equals |
Checks whether two insets objects are equal. |
int |
hashCode() |
Returns the hash code for this Insets. |
void |
set |
Set top, left, bottom, and right to the specified values |
String |
toString() |
Returns a string representation of this Insets object. |
public int top
public int left
public int bottom
public int right
public Insets(int top, int left, int bottom, int 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(int top, int left, int bottom, int 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(Object obj)
Insets
are equal if the four integer values of the fields top
, left
, bottom
, and right
are all equal.public int hashCode()
public 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
.public Object clone()
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/java/awt/Insets.html