Class TimeTablePrintGraph

  • All Implemented Interfaces:
    java.awt.print.Printable

    public class TimeTablePrintGraph
    extends java.lang.Object
    implements java.awt.print.Printable
    Print a timetable graph.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int _scheduleId  
      (package private) int _segmentId  
      (package private) boolean _showTrainTimes  
      (package private) boolean _twoPage  
      • Fields inherited from interface java.awt.print.Printable

        NO_SUCH_PAGE, PAGE_EXISTS
    • Constructor Summary

      Constructors 
      Constructor Description
      TimeTablePrintGraph​(int segmentId, int scheduleId, boolean showTrainTimes, boolean twoPage)
      Initialize the data used by the printing methods
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int print​(java.awt.Graphics g, java.awt.print.PageFormat pf, int page)  
      (package private) void printGraph()
      Setup the printer selection and start the print job.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TimeTablePrintGraph

        public TimeTablePrintGraph​(int segmentId,
                                   int scheduleId,
                                   boolean showTrainTimes,
                                   boolean twoPage)
        Initialize the data used by the printing methods
        Parameters:
        segmentId - The segment to be displayed. For multiple segment layouts separate graphs are required.
        scheduleId - The schedule to be used for this graph.
        showTrainTimes - When true, include the minutes portion of the train times at each station.
        twoPage - When true, format the output for two pages.
    • Method Detail

      • printGraph

        void printGraph()
        Setup the printer selection and start the print job.
      • print

        public int print​(java.awt.Graphics g,
                         java.awt.print.PageFormat pf,
                         int page)
                  throws java.awt.print.PrinterException
        Specified by:
        print in interface java.awt.print.Printable
        Throws:
        java.awt.print.PrinterException