Package jmri.jmrit.operations.trains
Class TrainPrintUtilities
- java.lang.Object
-
- jmri.jmrit.operations.trains.TrainPrintUtilities
-
public class TrainPrintUtilities extends java.lang.Object
Train print utilities. Used for train manifests and build reports.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static char
HORIZONTAL_LINE_SEPARATOR
(package private) static java.lang.String
NEW_LINE
(package private) static char
SPACE
(package private) static char
VERTICAL_LINE_SEPARATOR
-
Constructor Summary
Constructors Constructor Description TrainPrintUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
editReport(java.io.File file, java.io.File fileOut)
Creates a new build report file with the print detail numbers replaced by indentations.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.
-
-
-
Field Detail
-
NEW_LINE
static final java.lang.String NEW_LINE
- See Also:
- Constant Field Values
-
HORIZONTAL_LINE_SEPARATOR
static final char HORIZONTAL_LINE_SEPARATOR
- See Also:
- Constant Field Values
-
VERTICAL_LINE_SEPARATOR
static final char VERTICAL_LINE_SEPARATOR
- See Also:
- Constant Field Values
-
SPACE
static final char SPACE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TrainPrintUtilities
public TrainPrintUtilities()
-
-
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 previewedname
- Title of documentisPreview
- true if previewfontName
- optional font to use when printing documentisBuildReport
- true if build reportlogoURL
- optional pathname for logoprinterName
- optional default printer nameorientation
- Setup.LANDSCAPE, Setup.PORTRAIT, or Setup.HANDHELDfontSize
- font sizeprintHeader
- 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 filename
- train name
-
editReport
public static void editReport(java.io.File file, java.io.File fileOut)
Creates a new build report file with the print detail numbers replaced by indentations.- Parameters:
file
- Raw file with detail level numbersfileOut
- Formated file with indentations
-
getPrinterJComboBox
public static javax.swing.JComboBox<java.lang.String> getPrinterJComboBox()
-
getDefaultPrinterName
public static java.lang.String getDefaultPrinterName()
-
-