Padding
Inheritance: java.lang.Object
All Implemented Interfaces: java.lang.Cloneable
public class Padding implements Cloneable
Represents padding or margin information associated with element.
Constructors
Constructor | Description |
---|---|
Padding() | Initializes a new instance of Padding class using zero values. |
Padding(int all) | Initializes a new instance of the Padding class using the supplied padding size for all edges. |
Padding(int left, int right, int top, int bottom) | Initializes a new instance of the Padding class using the supplied padding sizes. |
Fields
Field | Description |
---|---|
Empty | Provides a Padding object with no padding. |
Methods
Method | Description |
---|---|
getAll() | Gets or sets the padding value for all the edges. |
setAll(int value) | Gets or sets the padding value for all the edges. |
getLeft() | Gets or sets the padding value for the left edge. |
setLeft(int value) | Gets or sets the padding value for the left edge. |
getRight() | Gets or sets the padding value for the right edge. |
setRight(int value) | Gets or sets the padding value for the right edge. |
getTop() | Gets or sets the padding value for the top edge. |
setTop(int value) | Gets or sets the padding value for the top edge. |
getBottom() | Gets or sets the padding value for the bottom edge. |
setBottom(int value) | Gets or sets the padding value for the bottom edge. |
getHorizontal() | Gets the combined padding for the right and left edges. |
getVertical() | Gets the combined padding for the top and bottom edges. |
deepClone() | Gets a copy of this object. |
toString() | Overrides conversion to string |
Padding()
public Padding()
Initializes a new instance of Padding class using zero values.
Padding(int all)
public Padding(int all)
Initializes a new instance of the Padding class using the supplied padding size for all edges.
Parameters:
Parameter | Type | Description |
---|---|---|
all | int | The number of measure units to be used for padding for all edges. |
Padding(int left, int right, int top, int bottom)
public Padding(int left, int right, int top, int bottom)
Initializes a new instance of the Padding class using the supplied padding sizes.
Parameters:
Parameter | Type | Description |
---|---|---|
left | int | The left padding size. |
right | int | The right padding size. |
top | int | The top padding size. |
bottom | int | The bottom padding size. |
Empty
public static final Padding Empty
Provides a Padding object with no padding.
getAll()
public final int getAll()
Gets or sets the padding value for all the edges. Changing of any partial edge like left or top makes this property equal 0;
Returns: int
setAll(int value)
public final void setAll(int value)
Gets or sets the padding value for all the edges. Changing of any partial edge like left or top makes this property equal 0;
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
getLeft()
public final int getLeft()
Gets or sets the padding value for the left edge.
Returns: int
setLeft(int value)
public final void setLeft(int value)
Gets or sets the padding value for the left edge.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
getRight()
public final int getRight()
Gets or sets the padding value for the right edge.
Returns: int
setRight(int value)
public final void setRight(int value)
Gets or sets the padding value for the right edge.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
getTop()
public final int getTop()
Gets or sets the padding value for the top edge.
Returns: int
setTop(int value)
public final void setTop(int value)
Gets or sets the padding value for the top edge.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
getBottom()
public final int getBottom()
Gets or sets the padding value for the bottom edge.
Returns: int
setBottom(int value)
public final void setBottom(int value)
Gets or sets the padding value for the bottom edge.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
getHorizontal()
public final int getHorizontal()
Gets the combined padding for the right and left edges.
Returns: int
getVertical()
public final int getVertical()
Gets the combined padding for the top and bottom edges.
Returns: int
deepClone()
public final Object deepClone()
Gets a copy of this object.
Returns: java.lang.Object
toString()
public String toString()
Overrides conversion to string
Returns: java.lang.String -