@Equality public class Padding extends java.lang.Object
Insets
, except that each member
may be null, to indicate that the user has no preference.
And it's immutable.Constructor and Description |
---|
Padding()
Constructs an empty padding object (no preferences).
|
Padding(java.lang.Integer top,
java.lang.Integer left,
java.lang.Integer bottom,
java.lang.Integer right)
Constructs a padding object with preferences for all dimensions.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.Integer |
getBottom()
Returns the required bottom margin.
|
java.lang.Integer |
getLeft()
Returns the required left margin.
|
java.lang.Integer |
getRight()
Returns the required right margin.
|
java.lang.Integer |
getTop()
Returns the required top margin.
|
int |
hashCode() |
boolean |
isDefinite()
Returns true if all the members of this padding object are non-null.
|
java.awt.Insets |
overrideInsets(java.awt.Insets insets)
Applies the requirements specified by this object to an existing
Insets object.
|
java.awt.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(java.lang.Integer top, java.lang.Integer left, java.lang.Integer bottom, java.lang.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 java.lang.Integer getTop()
public java.lang.Integer getLeft()
public java.lang.Integer getBottom()
public java.lang.Integer getRight()
public java.awt.Insets overrideInsets(java.awt.Insets insets)
insets
- input insets objectpublic boolean isDefinite()
public java.awt.Insets toDefiniteInsets()
isDefinite()
, otherwise nullpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.