Class TrainPrintUtilities


  • public class TrainPrintUtilities
    extends java.lang.Object
    Train print utilities. Used for train manifests and build reports.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void editReport​(java.io.File file, java.lang.String name)
      Creates a new build report file with the print detail numbers replaced by indentations.
      static java.lang.String getDefaultPrinterName()  
      static javax.swing.JComboBox<java.lang.String> getPrinterJComboBox()  
      static void printReport​(java.io.File file, java.lang.String name, boolean isPreview, java.lang.String fontName, boolean isBuildReport, java.lang.String logoURL, java.lang.String printerName, java.lang.String orientation, int fontSize, boolean printHeader)
      Print or preview a train manifest, build report, or switch list.
      • Methods inherited from class java.lang.Object

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

      • printReport

        public static void printReport​(java.io.File file,
                                       java.lang.String name,
                                       boolean isPreview,
                                       java.lang.String fontName,
                                       boolean isBuildReport,
                                       java.lang.String logoURL,
                                       java.lang.String printerName,
                                       java.lang.String orientation,
                                       int fontSize,
                                       boolean printHeader)
        Print or preview a train manifest, build report, or switch list.
        Parameters:
        file - File to be printed or previewed
        name - Title of document
        isPreview - true if preview
        fontName - optional font to use when printing document
        isBuildReport - true if build report
        logoURL - optional pathname for logo
        printerName - optional default printer name
        orientation - Setup.LANDSCAPE, Setup.PORTRAIT, or Setup.HANDHELD
        fontSize - font size
        printHeader - when true print page header
      • editReport

        public static void editReport​(java.io.File file,
                                      java.lang.String name)
        Creates a new build report file with the print detail numbers replaced by indentations. Then calls open desktop editor.
        Parameters:
        file - build file
        name - train name
      • getPrinterJComboBox

        public static javax.swing.JComboBox<java.lang.String> getPrinterJComboBox()