Class SheetPaperFormat

java.lang.Object
org.daisy.paper.AbstractPageFormat
org.daisy.paper.SheetPaperFormat
All Implemented Interfaces:
PageFormat

public class SheetPaperFormat extends AbstractPageFormat
Provides a paper format for cut-sheet paper.
Author:
Joel HÃ¥kansson
  • Constructor Details

    • SheetPaperFormat

      public SheetPaperFormat(SheetPaper paper, SheetPaperFormat.Orientation orientation)
      Creates a new cut-sheet paper.
      Parameters:
      paper - the paper to use
      orientation - the orientation of the paper
    • SheetPaperFormat

      public SheetPaperFormat(Length pageWidth, Length pageHeight)
      Creates a new cut-sheet paper.
      Parameters:
      pageWidth - the paper width in the default orientation
      pageHeight - the paper height in the default orientation
    • SheetPaperFormat

      public SheetPaperFormat(Length pageWidth, Length pageHeight, SheetPaperFormat.Orientation orientation)
      Creates a new cut-sheet paper.
      Parameters:
      pageWidth - the paper width in the default orientation
      pageHeight - the paper height in the default orientation
      orientation - the orientation
  • Method Details

    • getOrientation

      public SheetPaperFormat.Orientation getOrientation()
      Gets the orientation of this paper format.
      Returns:
      returns the orientation
    • getPageWidth

      public Length getPageWidth()
      Gets the page width with respect to the orientation of the paper format
      Returns:
      returns the width.
    • getPageHeight

      public Length getPageHeight()
      Gets the page height with respect to the orientation of the paper format
      Returns:
      returns the height.
    • getPageFormatType

      public PageFormat.Type getPageFormatType()
      Description copied from interface: PageFormat
      Gets the paper in this paper format
      Returns:
      returns the type
    • asSheetPaperFormat

      public SheetPaperFormat asSheetPaperFormat()
      Description copied from interface: PageFormat
      Returns this PageFormat as a SheetPaperFormat
      Specified by:
      asSheetPaperFormat in interface PageFormat
      Overrides:
      asSheetPaperFormat in class AbstractPageFormat
      Returns:
      returns the SheetPaperFormat
    • toString

      public String toString()
      Overrides:
      toString in class Object