public class Margins extends Object
Represents margin settings for each edge of an object.
Constructor and Description |
---|
Margins()
Initializes a new instance of the
class. |
Margins(int marginType,
double left,
double right,
double top,
double bottom)
Initializes a new instance of the
class with the specified type, location and size. |
Modifier and Type | Method and Description |
---|---|
double |
getBottom()
Gets the bottom margin.
|
double |
getLeft()
Gets the left margin.
|
int |
getMarginType()
Gets
. |
double |
getRight()
Gets the right margin.
|
double |
getTop()
Gets the top margin.
|
void |
setBottom(double value)
Sets the bottom margin.
|
void |
setLeft(double value)
Sets the left margin.
|
void |
setMarginType(int value)
Sets
. |
void |
setRight(double value)
Sets the right margin.
|
void |
setTop(double value)
Sets the top margin.
|
public Margins()
Margins
class.public Margins(int marginType, double left, double right, double top, double bottom)
Margins
class with the specified type, location and size.marginType
- The MarginType
. Specifies how margin values should be interpreted.left
- The left margin value.right
- The right margin value.top
- The top margin value.bottom
- The bottom margin value.public final int getMarginType()
MarginType
. Setting a new value to this property
automatically returns all margins to their default values (zero).
The default value is MarginType.Absolute
public final void setMarginType(int value)
MarginType
. Setting a new value to this property
automatically returns all margins to their default values (zero).
The default value is MarginType.Absolute
value
- The value specifying how margins should be interpreted.public final double getLeft()
Gets the left margin.
public final void setLeft(double value)
Sets the left margin.
value
- Horizontal offset from parent left border.public final double getRight()
Gets the right margin.
public final void setRight(double value)
Sets the right margin.
value
- Horizontal offset from parent right border.public final double getTop()
Gets the top margin.
public final void setTop(double value)
Sets the top margin.
value
- Horizontal offset from parent top border.public final double getBottom()
Gets the bottom margin.
public final void setBottom(double value)
Sets the bottom margin.
value
- Horizontal offset from parent bottom border.