PageMargins

Inheritance: java.lang.Object

public class PageMargins

Represents page margins for printing.

Constructors

ConstructorDescription
PageMargins()

Methods

MethodDescription
getBorders()Gets a position where to print borders.
getBottom()Gets the size of the bottom margin in inches or centimeters.
getLeft()Gets the size of the left margin in inches or centimeters.
getRight()Gets the size of the right margin in inches or centimeters.
getTop()Gets the size of the top margin in inches or centimeters.
setBorders(int value)Sets a position where to print borders.
setBottom(double value)Sets the size of the bottom margin in inches or centimeters.
setLeft(double value)Sets the size of the left margin in inches or centimeters.
setRight(double value)Sets the size of the right margin in inches or centimeters.
setTop(double value)Sets the size of the top margin in inches or 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 inches or centimeters.

Returns: double - the size of the bottom margin in inches or centimeters.

getLeft()

public final double getLeft()

Gets the size of the left margin in inches or centimeters.

Returns: double - the size of the left margin in inches or centimeters.

getRight()

public final double getRight()

Gets the size of the right margin in inches or centimeters.

Returns: double - the size of the right margin in inches or centimeters.

getTop()

public final double getTop()

Gets the size of the top margin in inches or centimeters.

Returns: double - the size of the top margin in inches or 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:

ParameterTypeDescription
valueinta position where to print borders.

setBottom(double value)

public final void setBottom(double value)

Sets the size of the bottom margin in inches or centimeters.

Parameters:

ParameterTypeDescription
valuedoublethe size of the bottom margin in inches or centimeters.

setLeft(double value)

public final void setLeft(double value)

Sets the size of the left margin in inches or centimeters.

Parameters:

ParameterTypeDescription
valuedoublethe size of the left margin in inches or centimeters.

setRight(double value)

public final void setRight(double value)

Sets the size of the right margin in inches or centimeters.

Parameters:

ParameterTypeDescription
valuedoublethe size of the right margin in inches or centimeters.

setTop(double value)

public final void setTop(double value)

Sets the size of the top margin in inches or centimeters.

Parameters:

ParameterTypeDescription
valuedoublethe size of the top margin in inches or centimeters.