Padding Class
Contains padding or margin information.
Declaration
public final class Padding extends Struct<Padding> implements IEquatable<Padding>
Implements
Inherited Members
Inheritance
Constructors
Padding() Constructor
Initializes a new instance of the Padding class.
Declaration
public Padding()
Padding(float all) Constructor
Initializes a new instance of the Padding class with specified settings.
Declaration
public Padding(float all)
Parameters
| Name | Type | Description |
|---|---|---|
| all | float | The padding value to apply to all sides of the element. |
Padding(float left, float top, float right, float bottom) Constructor
Initializes a new instance of the Padding class with specified settings.
Declaration
public Padding(float left, float top, float right, float bottom)
Parameters
| Name | Type | Description |
|---|---|---|
| left | float | The padding value for the left side of the element. |
| top | float | The padding value for the top side of the element. |
| right | float | The padding value for the right side of the element. |
| bottom | float | The padding value for the bottom side of the element. |
Fields
EMPTY Field
Returns a Padding structure with no padding.
Declaration
public static final Padding EMPTY
Field Value
| Type | Description |
|---|---|
Padding |
A |
Methods
equals(Object obj) Method
Determines whether the specified object is equal to the current Padding object.
Declaration
public boolean equals(Object obj)
Parameters
| Name | Type | Description |
|---|---|---|
| obj | Object | The object to compare with the current |
Returns
| Type | Description |
|---|---|
| boolean |
|
equals(Padding other) Method
Determines whether the specified Padding object is equal to the current Padding object.
Declaration
public boolean equals(Padding other)
Parameters
| Name | Type | Description |
|---|---|---|
| other | Padding |
The |
Returns
| Type | Description |
|---|---|
| boolean |
|
getAll() Method
Indicates padding for all element sides.
Declaration
public float getAll()
Returns
| Type | Description |
|---|---|
| float | The padding value applied to all sides of the element. |
getBottom() Method
Indicates padding for the bottom side of the element.
Declaration
public float getBottom()
Returns
| Type | Description |
|---|---|
| float | The padding value applied to the bottom side of the element. |
getHorizontal() Method
Gets the sum of left and right padding values.
Declaration
public float getHorizontal()
Returns
| Type | Description |
|---|---|
| float | The sum of left and right padding values. |
getIsEmpty() Method
Indicates whether all padding values are equal to zero.
Declaration
public boolean getIsEmpty()
Returns
| Type | Description |
|---|---|
| boolean |
|
getLeft() Method
Indicates padding for the left side of the element.
Declaration
public float getLeft()
Returns
| Type | Description |
|---|---|
| float | The padding value applied to the left side of the element. |
getRight() Method
Indicates padding for the right side of the element.
Declaration
public float getRight()
Returns
| Type | Description |
|---|---|
| float | The padding value applied to the right side of the element. |
getTop() Method
Indicates padding for the top side of the element.
Declaration
public float getTop()
Returns
| Type | Description |
|---|---|
| float | The padding value applied to the top side of the element. |
getVertical() Method
Gets the sum of the top and bottom padding values.
Declaration
public float getVertical()
Returns
| Type | Description |
|---|---|
| float | The sum of top and bottom padding values. |
hashCode() Method
Returns the hash code for the current Padding object.
Declaration
public int hashCode()
Returns
| Type | Description |
|---|---|
| int | The hash code for the current |