public void printSwitchList(Location location, boolean isPreview) { File buildFile = TrainManagerXml.instance().getSwitchListFile(location.getName()); if (!buildFile.exists()) { log.warn("Switch list file missing for location ({})", location.getName()); return; } if (isPreview && Setup.isManifestEditorEnabled()) { TrainPrintUtilities.openDesktopEditor(buildFile); } else { TrainPrintUtilities.printReport( buildFile, location.getName(), isPreview, Setup.getFontName(), false, FileUtil.getExternalFilename(Setup.getManifestLogoURL()), location.getDefaultPrinterName(), Setup.getSwitchListOrientation(), Setup.getManifestFontSize()); } if (!isPreview) { location.setStatus(Location.PRINTED); location.setSwitchListState(Location.SW_PRINTED); } }