| Constructor and Description |
|---|
Padding()
Constructs an empty padding object (no preferences).
|
Padding(Integer top,
Integer left,
Integer bottom,
Integer right)
Constructs a padding object with preferences for all dimensions.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Integer |
getBottom()
Returns the required bottom margin.
|
Integer |
getLeft()
Returns the required left margin.
|
Integer |
getRight()
Returns the required right margin.
|
Integer |
getTop()
Returns the required top margin.
|
int |
hashCode() |
boolean |
isDefinite()
Returns true if all the members of this padding object are non-null.
|
Insets |
overrideInsets(Insets insets)
Applies the requirements specified by this object to an existing
Insets object.
|
static Insets |
padInsets(Padding padding,
Insets insets)
Returns a non-null insets object based on a supplied Insets
which will be modified by the state of a supplied Padding.
|
Insets |
toDefiniteInsets()
Returns the insets object corresponding to this padding object
if all the members are non-null, and null otherwise.
|
public Padding()
public Padding(Integer top, Integer left, Integer bottom, Integer right)
top - required top margin in pixels, or nullleft - required left margin in pixels, or nullbottom - required bottom margin in pixels, or nullright - required right margin in pixels, or nullpublic Integer getTop()
public Integer getLeft()
public Integer getBottom()
public Integer getRight()
public Insets overrideInsets(Insets insets)
insets - input insets object, not nullpublic boolean isDefinite()
public Insets toDefiniteInsets()
isDefinite(), otherwise nullpublic static Insets padInsets(Padding padding, Insets insets)
This convenience method calls overrideInsets(java.awt.Insets) if
padding is non-null,
otherwise it returns the input insets.
padding - padding to override insets value, may be nullinsets - default insets, not nullCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.