Class PageMargins


  • public class PageMargins
    extends Object

    Represents page margins for printing.

    • Constructor Summary

      Constructors 
      Constructor Description
      PageMargins()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getBorders()
      Gets a position where to print borders.
      double getBottom()
      Gets the size of the bottom margin in centimeters.
      double getLeft()
      Gets the size of the left margin in centimeters.
      double getRight()
      Gets the size of the right margin in centimeters.
      double getTop()
      Gets the size of the top margin in centimeters.
      void setBorders​(int value)
      Sets a position where to print borders.
      void setBottom​(double value)
      Sets the size of the bottom margin in centimeters.
      void setLeft​(double value)
      Sets the size of the left margin in centimeters.
      void setRight​(double value)
      Sets the size of the right margin in centimeters.
      void setTop​(double value)
      Sets the size of the top margin in centimeters.
    • Constructor Detail

      • PageMargins

        public PageMargins()
    • Method Detail

      • getBorders

        public final int getBorders()

        Gets a position where to print borders. Can be one of the values of the Border enumeration.

        Returns:
        a position where to print borders.
      • setBorders

        public final void setBorders​(int value)

        Sets a position where to print borders. Can be one of the values of the Border enumeration.

        Parameters:
        value - a position where to print borders.
      • getBottom

        public final double getBottom()

        Gets the size of the bottom margin in centimeters.

        Returns:
        the size of the bottom margin in centimeters.
      • setBottom

        public final void setBottom​(double value)

        Sets the size of the bottom margin in centimeters.

        Parameters:
        value - the size of the bottom margin in centimeters.
      • getLeft

        public final double getLeft()

        Gets the size of the left margin in centimeters.

        Returns:
        the size of the left margin in centimeters.
      • setLeft

        public final void setLeft​(double value)

        Sets the size of the left margin in centimeters.

        Parameters:
        value - the size of the left margin in centimeters.
      • getRight

        public final double getRight()

        Gets the size of the right margin in centimeters.

        Returns:
        the size of the right margin in centimeters.
      • setRight

        public final void setRight​(double value)

        Sets the size of the right margin in centimeters.

        Parameters:
        value - the size of the right margin in centimeters.
      • getTop

        public final double getTop()

        Gets the size of the top margin in centimeters.

        Returns:
        the size of the top margin in centimeters.
      • setTop

        public final void setTop​(double value)

        Sets the size of the top margin in centimeters.

        Parameters:
        value - the size of the top margin in centimeters.