|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
public interface DocPrintJob
이 인터페이스는, 작업 속성 세트를 보관 유지하는 지정된 문서를 인쇄 가능한 인쇄 작업을 나타냅니다. 이 인터페이스를 구현하는 객체는, 인쇄 서비스로부터 취득할 수 있습니다.
메소드의 개요 | |
---|---|
void |
addPrintJobAttributeListener (PrintJobAttributeListener listener,
PrintJobAttributeSet attributes)
지정된 속성의 변경용의 청취자를 등록합니다. |
void |
addPrintJobListener (PrintJobListener listener)
이 인쇄 작업시에 발생하는 이벤트의 청취자를 등록합니다. |
PrintJobAttributeSet |
getAttributes ()
이 Print Job 의 인쇄 속성 세트를 가져옵니다. |
PrintService |
getPrintService ()
이 인쇄 작업이 바인드 되고 있는 PrintService 객체를 판별합니다. |
void |
print (Doc doc,
PrintRequestAttributeSet attributes)
문서가 지정된 작업 속성으로 인쇄합니다. |
void |
removePrintJobAttributeListener (PrintJobAttributeListener listener)
이 인쇄 작업으로부터 속성 청취자를 삭제합니다. |
void |
removePrintJobListener (PrintJobListener listener)
이 인쇄 작업으로부터 청취자를 삭제합니다. |
메소드의 상세 |
---|
PrintService getPrintService()
PrintService
객체를 판별합니다.
PrintService
객체PrintJobAttributeSet getAttributes()
getAttributes()
메소드 호출시의 「snapshot」입니다. 즉, 이 Print Job 의 속성 세트의 내용이 장래 변경되어도, 반환되는 속성 세트 객체의 내용은 갱신되지 않습니다. 속성치의 변경을 검출하려면 ,getAttributes()
를 재차 호출해, 신규 속성 세트를 이전의 속성 세트와 비교합니다. 이제(벌써) 1 개의 방법으로서 인쇄 작업 이벤트의 청취자를 등록할 수도 있습니다. 반환되는 값은, 빈 상태(empty)세트에서도 괜찮습니다가, null 로 할 수 없습니다.
void addPrintJobListener(PrintJobListener listener)
listener
- 청취자 인터페이스를 구현하는 객체removePrintJobListener(javax.print.event.PrintJobListener)
void removePrintJobListener(PrintJobListener listener)
listener
- 청취자 인터페이스를 구현하는 객체addPrintJobListener(javax.print.event.PrintJobListener)
void addPrintJobAttributeListener(PrintJobAttributeListener listener, PrintJobAttributeSet attributes)
getAttributes()
를 호출해, 청취자에게 보고하는 것 같은 관심이 있는 부분집합을 식별할 수 있습니다. 특정의 작업 속성의 변경 갱신을 기대하고 있는 클라이언트는, 해당하는 세트인 것을 확인할 필요가 있습니다. 다만, 속성의 갱신은, 실제로 변경을 해 작업이 그것을 검출했을 경우인 만큼 실행됩니다. 갱신은 또, 작업에 의한 배치처리의 대상이 되는 경우가 있습니다. 인쇄 작업의 처리로 발생하는 오버헤드를 최소한으로 억제하기 (위해)때문에, 변경을 할 가능성의 높은 속성의 부분집합만으로 대기를 실시하는 것을 추천합니다. 지정된 세트가 빈 상태(empty)의 경우, 속성의 갱신은 청취자에게 보고되지 않습니다. 속성 세트가 null 의 경우, 작업이 지원하는 모든 동적 속성으로 대기하는 것을 의미합니다. 이 때문에, 작업이 속성 갱신을 1 개도 보고할 수 없는 경우, 갱신 통지는 일절 행해지지 않습니다.
청취자가 등록을 마친 경우, 재차 등록됩니다.
listener
- 청취자 인터페이스를 구현하는 객체attributes
- 작업에 의해 결정된 대기 대상의 속성,
또는 변경 가능한 모든 속성을 의미하는 nullremovePrintJobAttributeListener(javax.print.event.PrintJobAttributeListener)
void removePrintJobAttributeListener(PrintJobAttributeListener listener)
listener
- 청취자 인터페이스를 구현하는 객체addPrintJobAttributeListener(javax.print.event.PrintJobAttributeListener, javax.print.attribute.PrintJobAttributeSet)
void print(Doc doc, PrintRequestAttributeSet attributes) throws PrintException
인쇄 서비스의 구현자는, 클라이언트 doc 로부터 취득한 모든 인쇄 데이터 스트림 (Reader 또는 InputStream 구현)을 닫을 필요가 있습니다. 견뢰한 클라이언트안에는, 이것을 검증하는 것도 있습니다. DocFlavor
를 출력할 수 없는 경우, 항상 예외가 생성됩니다.
doc
- 인쇄하는 문서. 이 PrintJob 가 지원하는 후레이바가 아니면 안되는attributes
- 이 인쇄 작업에 적용하는 작업 속성.
이 파라미터가 null 의 경우, 디폴트 속성이 사용된다
PrintException
- 이 예외에 의해,
원인을 보다 정확하게 기술하는 인터페이스가
구현되는 일도 있다
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.