java.awt

Class Insets

public class Insets extends Object implements Cloneable, Serializable

This class represents the "margin" or space around a container.

UNKNOWN:

Field Summary
intbottom
The gap from the bottom.
intleft
The gap from the left.
intright
The gap from the right.
inttop
The gap from the top.
Constructor Summary
Insets(int top, int left, int bottom, int right)
Initializes a new instance of Inset with the specified inset values.
Method Summary
Objectclone()
Returns a copy of this object.
booleanequals(Object obj)
Tests whether this object is equal to the specified object.
inthashCode()
Returns a hashcode for this instance.
voidset(int top, int left, int bottom, int right)
Set the contents of this Insets object to the specified values.
StringtoString()
Returns a string representation of this object, which will be non-null.

Field Detail

bottom

public int bottom
The gap from the bottom.

Serial: the bottom inset

left

public int left
The gap from the left.

Serial: the left inset

right

public int right
The gap from the right.

Serial: the right inset

top

public int top
The gap from the top.

Serial: the top inset

Constructor Detail

Insets

public Insets(int top, int left, int bottom, int right)
Initializes a new instance of Inset with the specified inset values.

Parameters: top the top inset left the left inset bottom the bottom inset right the right inset

Method Detail

clone

public Object clone()
Returns a copy of this object.

Returns: a copy of this object

equals

public boolean equals(Object obj)
Tests whether this object is equal to the specified object. The other object must be an instance of Insets with identical field values.

Parameters: obj the object to test against

Returns: true if the specified object is equal to this one

Since: 1.1

hashCode

public int hashCode()
Returns a hashcode for this instance. The formula is unspecified, but appears to be XXX what is it? .

Returns: the hashcode

set

public void set(int top, int left, int bottom, int right)
Set the contents of this Insets object to the specified values.

Parameters: top the top inset left the left inset bottom the bottom inset right the right inset

Since: 1.5

toString

public String toString()
Returns a string representation of this object, which will be non-null.

Returns: a string representation of this object