这里面包含了一百多个JAVA源文件

源代码在线查看: e714. listening for print job status changes.txt

软件大小: 551 K
上传用户: maple_78
关键词: JAVA
下载地址: 免注册下载 普通下载 VIP

相关代码

				In order to get status on a print job, a print job listener must be added to the print job before it is submitted to the print service. These status changes are common to all print jobs. A print service may support other types of print job status changes and these are delivered through a print job attribute listener rather than a print job listener; see e715 Listening for Print Job Attribute Changes. 
				    // Create the print job
				    DocPrintJob job = service.createPrintJob();
				    job.addPrintJobListener(new MyPrintJobListener());
				    
				    class MyPrintJobListener implements PrintJobListener {
				        public void printDataTransferCompleted(PrintJobEvent pje) {
				            // The print data has been transferred to the print service
				        }
				    
				        public void printJobCanceled(PrintJobEvent pje) {
				            // The print job was cancelled
				        }
				    
				        public void printJobCompleted(PrintJobEvent pje) {
				            // The print job was completed
				        }
				    
				        public void printJobFailed(PrintJobEvent pje) {
				            // The print job has failed
				        }
				    
				        public void printJobNoMoreEvents(PrintJobEvent pje) {
				            // No more events will be delivered from this
				            // print service for this print job.
				            // This event is fired in cases where the print service
				            // is not able to determine when the job completes.
				        }
				    
				        public void printJobRequiresAttention(PrintJobEvent pje) {
				            // The print service requires some attention to repair
				            // some problem. E.g. running out of paper would
				            // cause this event to be fired.
				        }
				    }
				
							

相关资源