|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.draw2d.geometry.Insets
Stores four integers for top, left, bottom, and right measurements.
Field Summary | |
int |
bottom
distance from bottom |
int |
left
distance from left |
int |
right
distance from right |
int |
top
distance from top |
Constructor Summary | |
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. |
Method Summary | |
Insets |
add(Insets insets)
Adds the values of the specified Insets to this Insets' values. |
boolean |
equals(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 . |
boolean |
isEmpty()
Returns true if all values are 0. |
String |
toString()
|
Insets |
transpose()
Transposes this object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public int left
public int top
public int bottom
public int right
Constructor Detail |
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.Method Detail |
public Insets add(Insets insets)
insets
- the Insets being added
this
for conveniencepublic boolean equals(Object o)
equals
in class Object
o
- Object being tested for equality.
public Insets getAdded(Insets insets)
insets
- Insets to be added
public int getHeight()
top
+ bottom
.
getWidth()
public Insets getTransposed()
public int getWidth()
left
+ right
.
getHeight()
public boolean isEmpty()
public String toString()
toString
in class Object
public Insets transpose()
this
for convenience
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |