public class Margins extends Object
Represents margin settings for each edge of an object.
Constructor and Description |
---|
Margins()
Initializes a new instance of the
Margins class. |
Margins(int marginType,
double left,
double right,
double top,
double bottom)
Initializes a new instance of the
Margins class. |
Modifier and Type | Method and Description |
---|---|
double |
getBottom()
Gets the bottom margin.
|
double |
getLeft()
Gets the left margin.
|
int |
getMarginType()
Gets margin type.
|
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 margin type.
|
void |
setRight(double value)
Sets the right margin.
|
void |
setTop(double value)
Sets the top margin.
|
public Margins()
Initializes a new instance of the Margins
class.
public Margins(int marginType, double left, double right, double top, double bottom)
Initializes a new instance of the Margins
class.
marginType
- The margin type. 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()
Gets margin type. Setting a new value to this property automatically returns all margins to their default values (zero).
Watermarks.MarginType.Absolute
public final void setMarginType(int value)
Sets margin type. Setting a new value to this property automatically returns all margins to their default values (zero).
value
- The value specifying how margins should be interpreted.
The default value is Watermarks.MarginType.Absolute
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.Copyright © 2020. All rights reserved.