public void PrintSingles() { if (Mechs.size() == 0) { return; } page.setPaper(paper); if (useDialog) { if (Mechs.size() == 1) { if (!PrintDialog((PrintMech) Mechs.get(0))) return; } else { if (!BatchDialog()) return; } } for (int index = 0; index <= Mechs.size() - 1; index++) { PrintMech pm = (PrintMech) Mechs.get(index); job.setJobName(pm.CurMech.GetFullName().trim()); job.setPrintable(pm); try { job.print(); } catch (PrinterException ex) { Logger.getLogger(Printer.class.getName()).log(Level.SEVERE, null, ex); } } }
private void GeneratePrints() { // reset the book so we don't get extra pages! pages = new Book(); // start building the print objects necessary page.setPaper(paper); for (int index = 0; index <= Mechs.size() - 1; index++) { PrintMech pm = (PrintMech) Mechs.get(index); pages.append(pm, page); if (Mechs.size() == 1) job.setJobName(pm.CurMech.GetFullName().trim()); } }