public class Insets
extends java.lang.Object
implements java.io.Serializable
Component relative to its container.
Null values for top/left/right/bottom margins indicate a 0-pixel inset
for that margin.| Constructor and Description |
|---|
Insets(Extent size)
Creates a new Insets object, defining all margins to be the provided
value.
|
Insets(Extent horizontal,
Extent vertical)
Creates a new Insets object by defining values for the horizontal and
vertical margins.
|
Insets(Extent left,
Extent top,
Extent right,
Extent bottom)
Creates a new Insets object with the given margin sizes.
|
Insets(int sizePx)
Creates a new Insets object, defining all margins to be the provided
value.
|
Insets(int horizontal,
int vertical)
Creates a new Insets object by defining values for the horizontal and
vertical margins.
|
Insets(int leftPx,
int topPx,
int rightPx,
int bottomPx)
Creates a new Insets object with the given pixel margin sizes.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
Extent |
getBottom()
Returns the size of the bottom margin.
|
Extent |
getLeft()
Returns the size of the left margin.
|
Extent |
getRight()
Returns the size of the right margin.
|
Extent |
getTop()
Returns the size of the top margin.
|
public Insets(int leftPx,
int topPx,
int rightPx,
int bottomPx)
leftPx - the size of the left margin in pixelstopPx - the size of the top margin in pixelsrightPx - the size of the right margin in pixelsbottomPx - the size of the bottom margin in pixelspublic Insets(Extent left, Extent top, Extent right, Extent bottom)
Insets only supports Extents with
fixed (i.e., not percent) units.left - the size of the left margintop - the size of the top marginright - the size of the right marginbottom - the size of the bottom marginpublic Insets(int sizePx)
sizePx - the margin size in pixelspublic Insets(Extent size)
Insets only supports Extents with
fixed (i.e., not percent) units.size - the margin sizepublic Insets(int horizontal,
int vertical)
horizontal - the size of the horizontal (left and right) margins in pixelsvertical - the size of the vertical (top and bottom) margins in pixelspublic boolean equals(java.lang.Object o)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public Extent getBottom()
Insets only supports Extents with
fixed (i.e., not percent) units.public Extent getLeft()
Insets only supports Extents with
fixed (i.e., not percent) units.public Extent getRight()
Insets only supports Extents with
fixed (i.e., not percent) units.public Extent getTop()
Insets only supports Extents with
fixed (i.e., not percent) units.