public class Insets
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
int |
bottom
distance from bottom
|
int |
left
distance from left
|
int |
right
distance from right
|
int |
top
distance from top
|
Constructor and Description |
---|
Insets()
Constructs an Insets with all zeroes.
|
Insets(Insets i)
Constructs a new Insets with initial values the same as the provided
Insets.
|
Insets(int i)
Constructs a new Insets with all the sides set to the speicifed value.
|
Insets(int top,
int left,
int bottom,
int right)
Creates a new Insets with the specified top, left, bottom, and right
values.
|
Modifier and Type | Method and Description |
---|---|
Insets |
add(Insets insets)
Adds the values of the specified Insets to this Insets' values.
|
boolean |
equals(java.lang.Object o)
Test for equality.
|
Insets |
getAdded(Insets insets)
Creates an Insets representing the sum of this Insets with the specified
Insets.
|
int |
getHeight()
Returns the height for this Insets, equal to
top +
bottom . |
Insets |
getTransposed()
Creates a new Insets with transposed values.
|
int |
getWidth()
Returns the width for this Insets, equal to
left +
right . |
int |
hashCode() |
boolean |
isEmpty()
Returns true if all values are 0.
|
java.lang.String |
toString() |
Insets |
transpose()
Transposes this object.
|
public int left
public int top
public int bottom
public int right
public Insets()
public Insets(Insets i)
i
- The insets to copy.public Insets(int i)
i
- Value applied to all sides of new Insets.public Insets(int top, int left, int bottom, int right)
top
- Value of the top space.left
- Value of the left space.bottom
- Value of the bottom space.right
- Value of the right space.public Insets add(Insets insets)
insets
- the Insets being addedthis
for conveniencepublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- Object being tested for equality.public Insets getAdded(Insets insets)
insets
- Insets to be addedpublic int getHeight()
top
+
bottom
.getWidth()
public Insets getTransposed()
public int getWidth()
left
+
right
.getHeight()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean isEmpty()
public java.lang.String toString()
toString
in class java.lang.Object
public Insets transpose()
this
for convenienceCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.