Klasse PrinterJobProgress
java.lang.Object
com.inet.viewer.Progress
com.inet.viewer.PrinterJobProgress
This is a background progress for printing. If you want use this class directly for background printing
then you can use a code like:
PrinterJob printerJob = PrinterJob.getPrinterJob();
PrintRequestAttributeSet attributeSet = new HashPrintRequestAttributeSet();
Progress progress = new PrinterJobProgress(null, printerJob, attributeSet, data);
progress.startProgress();
....
progress.waitUntilFinished();
-
Feldübersicht
Von Klasse geerbte Felder Progress
PROP_PROGRESS_INDETERMINATE, PROP_PROGRESS_STATUS, PROP_PROGRESS_STEP, PROP_PROGRESS_TOTAL, propertySupporter, STATUS_CANCELED, STATUS_COMPLETED, STATUS_ERROR, STATUS_IDLE, STATUS_INITIALIZED, STATUS_NOT_INITIALIZED, STATUS_RUNNING, TYPE_EXPORT, TYPE_INVISIBLE, TYPE_PAGELOADER, TYPE_PRINT, TYPE_SEARCHVon Schnittstelle geerbte Felder Printable
NO_SUCH_PAGE, PAGE_EXISTS -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungPrinterJobProgress(ReportView parent, PrinterJob printerJob, PrintRequestAttributeSet attributeSet, RenderData data) Creates a new Thread for printing in the background. -
Methodenübersicht
Modifikator und TypMethodeBeschreibungvoidcancel()Call this method to force a cancel of the progress - which must also set both of the states "finished" and "canceled" to true.final StringgetName()The name of the daemon thread.voidInitialize missing print attributes from the render data.intprint(Graphics g, PageFormat currentPageFormat, int pageIndex) FOR INTERNAL USE ONLYvoidrun()This is the run method of the thread.Von Klasse geerbte Methoden Progress
addPropertyChangeListener, cleanUp, getErrorMessage, getProgress, getReportView, getStatus, getTotalProgress, getType, isCanceled, isErrored, isFinished, isIndeterminate, removePropertyChangeListener, setErrorMessage, setIndeterminate, setProgress, setStatus, setTotalProgress, showError, startProgress, waitUntilFinished
-
Konstruktordetails
-
PrinterJobProgress
public PrinterJobProgress(ReportView parent, PrinterJob printerJob, PrintRequestAttributeSet attributeSet, RenderData data) Creates a new Thread for printing in the background.- Parameter:
parent- if this null then Error messages will not display.printerJob- The PrinterJob with the target PrintService.attributeSet- A list of attributes that override values in the report design. For example paper format, paper orientation and page margins.data- The data of the report that should be printed.- Seit:
- 7.0
-
-
Methodendetails
-
getName
-
cancel
-
initPrintRequestAttributes
public void initPrintRequestAttributes()Initialize missing print attributes from the render data. Is call from the progress.- Seit:
- 17.0
-
run
-
print
FOR INTERNAL USE ONLY- Angegeben von:
printin SchnittstellePrintable- Parameter:
g- the context into which the page is drawncurrentPageFormat- the size and orientation of the page being drawnpageIndex- the zero based index of the page to be drawn- Gibt zurück:
- PAGE_EXISTS or NO_SUCH_PAGE
- Löst aus:
PrinterException- If it has occurred during printing- Seit:
- 7.0
-