PageMargins
Inheritance: java.lang.Object
public class PageMargins
Represents page margins for printing.
Constructors
| Constructor | Description |
|---|---|
| PageMargins() |
Methods
| Method | Description |
|---|---|
| getBorders() | Gets a position where to print borders. |
| getBottom() | Gets the size of the bottom margin in centimeters. |
| getLeft() | Gets the size of the left margin in centimeters. |
| getRight() | Gets the size of the right margin in centimeters. |
| getTop() | Gets the size of the top margin in centimeters. |
| setBorders(int value) | Sets a position where to print borders. |
| setBottom(double value) | Sets the size of the bottom margin in centimeters. |
| setLeft(double value) | Sets the size of the left margin in centimeters. |
| setRight(double value) | Sets the size of the right margin in centimeters. |
| setTop(double value) | Sets the size of the top margin in centimeters. |
PageMargins()
public PageMargins()
getBorders()
public final int getBorders()
Gets a position where to print borders. Can be one of the values of the Border enumeration.
Returns: int - a position where to print borders.
getBottom()
public final double getBottom()
Gets the size of the bottom margin in centimeters.
Returns: double - the size of the bottom margin in centimeters.
getLeft()
public final double getLeft()
Gets the size of the left margin in centimeters.
Returns: double - the size of the left margin in centimeters.
getRight()
public final double getRight()
Gets the size of the right margin in centimeters.
Returns: double - the size of the right margin in centimeters.
getTop()
public final double getTop()
Gets the size of the top margin in centimeters.
Returns: double - the size of the top margin in centimeters.
setBorders(int value)
public final void setBorders(int value)
Sets a position where to print borders. Can be one of the values of the Border enumeration.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int | a position where to print borders. |
setBottom(double value)
public final void setBottom(double value)
Sets the size of the bottom margin in centimeters.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | double | the size of the bottom margin in centimeters. |
setLeft(double value)
public final void setLeft(double value)
Sets the size of the left margin in centimeters.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | double | the size of the left margin in centimeters. |
setRight(double value)
public final void setRight(double value)
Sets the size of the right margin in centimeters.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | double | the size of the right margin in centimeters. |
setTop(double value)
public final void setTop(double value)
Sets the size of the top margin in centimeters.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | double | the size of the top margin in centimeters. |