Module Simula

Class RTS_PageWriter.Sheet

java.lang.Object
simula.runtime.RTS_PageWriter.Sheet
All Implemented Interfaces:
Printable
Enclosing class:
RTS_PageWriter

private class RTS_PageWriter.Sheet extends Object implements Printable
Utility class to represent a printable sheet.
  • Field Details

    • printer

      private RTS_PageWriter printer
      The printer.
    • pageNumber

      public int pageNumber
      The page number
    • sheetNumber

      public int sheetNumber
      The sheet number
    • lines

      private Vector<String> lines
      The set of lines
  • Constructor Details

    • Sheet

      public Sheet(RTS_PageWriter printer, int pageNumber, int sheetNumber)
      Create a new Sheet.
      Parameters:
      printer - the printer
      pageNumber - the page number
      sheetNumber - the sheet number
  • Method Details

    • nLines

      public int nLines()
      Returns the number of lines.
      Returns:
      the number of lines
    • addLine

      public void addLine(String text)
      Add a line of text to this Sheet.
      Parameters:
      text - the text to add
    • print

      public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException
      Specified by:
      print in interface Printable
      Throws:
      PrinterException