Class SheetPaper

All Implemented Interfaces:
Serializable, Comparable<Factory>, Factory, Paper

public class SheetPaper extends AbstractPaper
Provides a paper object for cut-sheet paper.
Author:
Joel HÃ¥kansson
See Also:
  • Field Details

    • pageWidth

      protected final Length pageWidth
    • pageHeight

      protected final Length pageHeight
  • Constructor Details

    • SheetPaper

      public SheetPaper(String name, String desc, Enum<? extends Enum<?>> identifier, Length pageWidth, Length pageHeight)
      Creates a new cut-sheet paper.
      Parameters:
      name - a name
      desc - a description
      identifier - an identifier
      pageWidth - the width of the paper in the default orientation
      pageHeight - the height of the paper in the default orientation
  • Method Details

    • getType

      public Paper.Type getType()
      Description copied from interface: Paper
      Gets the type of paper
      Returns:
      returns the type of paper
    • getPageWidth

      public Length getPageWidth()
      Gets the width of the paper in the default orientation
      Returns:
      returns the width
    • getPageHeight

      public Length getPageHeight()
      Gets the height of the paper in default orientation
      Returns:
      returns the height
    • asSheetPaper

      public SheetPaper asSheetPaper()
      Description copied from interface: Paper
      Returns this Paper as a SheetPaper
      Specified by:
      asSheetPaper in interface Paper
      Overrides:
      asSheetPaper in class AbstractPaper
      Returns:
      returns the SheetPaper
    • toString

      public String toString()
      Overrides:
      toString in class AbstractFactory