/** Marks this job as cancelled. * @param <tt>job</tt> */ void setCancelled(PrinterJob job) { job.cancel(); }
/** Marks this job as cancelled. * @param <tt>job</tt> */ void setCancelled(PrinterJob job) { job.cancel(); } /** @return <tt>true</tt> iff the job was cancelled */
public void notePrintFailure(PrinterJob job) { if (job==this.job) { this.job.cancel(); this.job=null; } }
/** Marks this job as cancelled. * @param <tt>job</tt> */ void setCancelled(PrinterJob job) { job.cancel(); } /** @return <tt>true</tt> iff the job was cancelled */
/** * Cancel the print job. Disables the cancel button, as it might * take a while for the cancel to take effect. */ public void doCancel() { cancel.setEnabled(false); pjob.cancel(); }
@Override public void interrupt() { // no super.interrupt() because // we better terminate the print job gracefully -- // hopefully... if (request != null) { LOGGER.fine("printing canceled"); request.job.cancel(); request = null; } abortRequested = true; } }
/** @deprecated Use {@link #getPageFormat(PrinterJob)} instead. */ public PageFormat getPageFormat() { if (pageFormat == null) { PrinterJob pj = PrinterJob.getPrinterJob(); pageFormat = pj.defaultPage(new PageFormat()); pj.cancel(); } return pageFormat; }
/** @deprecated Use {@link #getPageFormat(PrinterJob)} instead. */ public PageFormat getPageFormat() { if (pageFormat == null) { PrinterJob pj = PrinterJob.getPrinterJob(); pageFormat = pj.defaultPage(new PageFormat()); pj.cancel(); } return pageFormat; }
private PrinterJob getJob() job.cancel(); job=null;
/** * @return <tt>null</tt> Shows pageDialog, however. */ public java.awt.Component getCustomEditor() { PageFormat pf = (PageFormat) getValue(); PrinterJob pj = PrinterJob.getPrinterJob(); PageFormat npf = pj.pageDialog(pf); //setValue(npf); ((PrintSettings) PrintSettings.findObject(PrintSettings.class)).setPageFormat((PageFormat) npf.clone()); pj.cancel(); return null; } }
/** * @return <tt>null</tt> Shows pageDialog, however. */ public java.awt.Component getCustomEditor() { PageFormat pf = (PageFormat) getValue(); PrinterJob pj = PrinterJob.getPrinterJob(); PageFormat npf = pj.pageDialog(pf); //setValue(npf); ((PrintSettings) PrintSettings.findObject(PrintSettings.class)).setPageFormat((PageFormat) npf.clone()); pj.cancel(); return null; } }