|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 전의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요 : 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 | |||||||||
java.lang.Objectjava.awt.PageAttributes
public final class PageAttributes
인쇄한 페이지의 출력을 제어하는 속성 세트입니다.
이 클래스의 인스턴스는, 색 상태, 용지 사이즈 (미디어의 종류), 용지 방향, 논리적인 원점, 인쇄 품질, 및 인스턴스를 사용하는 각 페이지의 해상도를 제어합니다. 속성명은, 가능한 경우 Internet Printing Protocol (IPP) 1.1 에 준거하고 있습니다. 속성치는 가능한 경우, 부분적으로 Internet Printing Protocol (IPP) 1.1 에 준거하고 있습니다.
내부 클래스형을 취하는 메소드를 사용하려면 , 그 내부 클래스의 정수 필드에 대한 참조를 건네줍니다. 클라이언트 코드는, 이 클래스가 public 생성자 을 가지지 않기 때문에, 내부 클래스형의 신규 인스턴스를 작성할 수 없습니다. 색 상태를 흑백으로 설정하려면 , 다음의 코드를 사용합니다.
import java.awt.PageAttributes;
public class MonochromeExample {
public void setMonochrome(PageAttributes pageAttributes) {
pageAttributes.setColor(PageAttributes.ColorType.MONOCHROME);
}
}
attributeName 의 디폴트 값를 지원하는 모든 IPP 속성은, 대응하는 setattributeNameToDefault 메소드를 가지고 있습니다. 디폴트 값의 필드는 제공되고 있지 않습니다.
| 상자의 클래스의 개요 | |
|---|---|
static class |
PageAttributes.ColorType
사용 가능한 칼라 상태의 형태 보증된 열거 |
static class |
PageAttributes.MediaType
사용 가능한 용지 사이즈의 형태 보증된 열거입니다. |
static class |
PageAttributes.OrientationRequestedType
사용 가능한 용지 방향의 형태 보증된 열거입니다. |
static class |
PageAttributes.OriginType
사용 가능한 원점의 형태 보증된 열거입니다. |
static class |
PageAttributes.PrintQualityType
사용 가능한 인쇄 품질의 형태 보증된 열거입니다. |
| 생성자 의 개요 | |
|---|---|
PageAttributes ()
각 속성에 디폴트의 값을 가지는 PageAttributes 인스턴스를 생성합니다. |
|
PageAttributes (PageAttributes.ColorType color,
PageAttributes.MediaType media,
PageAttributes.OrientationRequestedType orientationRequested,
PageAttributes.OriginType origin,
PageAttributes.PrintQualityType printQuality,
int[] printerResolution)
각 속성으로 지정된 값을 가지는 PageAttributes 인스턴스를 생성합니다. |
|
PageAttributes (PageAttributes obj)
지정된 PageAttributes 의 카피인 PageAttributes 인스턴스를 생성합니다. |
|
| 메소드의 개요 | |
|---|---|
Object |
clone ()
PageAttributes 의 카피를 작성해, 돌려줍니다. |
boolean |
equals (Object obj)
2 개의 PageAttributes 가 같은지 어떤지를 판정합니다. |
PageAttributes.ColorType |
getColor ()
이러한 속성을 사용하는 페이지를 칼라로 draw 할까 흑백으로 draw 할까를 돌려줍니다. |
PageAttributes.MediaType |
getMedia ()
이러한 속성을 사용하는 페이지의 용지 사이즈를 돌려줍니다. |
PageAttributes.OrientationRequestedType |
getOrientationRequested ()
이러한 속성을 사용하는 페이지의 용지 방향을 돌려줍니다. |
PageAttributes.OriginType |
getOrigin ()
이러한 속성을 사용하는 페이지의 (0, 0) draw를 물리 페이지의 좌상구석으로 하는지, 인쇄 범위의 좌상구석으로 할까를 돌려줍니다. |
int[] |
getPrinterResolution ()
이러한 속성을 사용하는 페이지의 인쇄 해상도를 돌려줍니다. |
PageAttributes.PrintQualityType |
getPrintQuality ()
이러한 속성을 사용하는 페이지의 인쇄 품질을 돌려줍니다. |
int |
hashCode ()
이 PageAttributes 의 해시 코드값를 돌려줍니다. |
void |
set (PageAttributes obj)
PageAttributes 의 모든 속성을 obj 의 속성과 같은 값으로 설정합니다. |
void |
setColor (PageAttributes.ColorType color)
이러한 속성을 사용하는 페이지를 칼라로 draw 할까 흑백으로 draw 하는지를 지정합니다. |
void |
setMedia (PageAttributes.MediaType media)
이러한 속성을 사용하는 페이지의 용지 사이즈를 지정합니다. |
void |
setMediaToDefault ()
이러한 속성을 사용하는 페이지의 용지 사이즈를 디폴트 로케일의 디폴트 사이즈로 지정합니다. |
void |
setOrientationRequested (int orientationRequested)
이러한 속성을 사용하는 페이지의 용지 방향을 지정합니다. |
void |
setOrientationRequested (PageAttributes.OrientationRequestedType orientationRequested)
이러한 속성을 사용하는 페이지의 용지 방향을 지정합니다. |
void |
setOrientationRequestedToDefault ()
이러한 속성을 사용하는 페이지의 용지 방향을 디폴트로 설정합니다. |
void |
setOrigin (PageAttributes.OriginType origin)
이러한 속성을 사용하는 페이지의 (0, 0) draw를 물리 페이지의 좌상구석으로 하는지, 인쇄 범위의 좌상구석으로 하는지를 지정합니다. |
void |
setPrinterResolution (int printerResolution)
이러한 속성을 사용하는 페이지의 전후 보내 또는 송의 인쇄 해상도를 1 인치 당의 닷수로 지정합니다. |
void |
setPrinterResolution (int[] printerResolution)
실제의 해상도는, 구현이나 출력처 프린터의 제한에 의해 정해집니다. |
void |
setPrinterResolutionToDefault ()
이러한 속성을 사용하는 페이지의 프린터 해상도를 디폴트로 설정합니다. |
void |
setPrintQuality (int printQuality)
이러한 속성을 사용하는 페이지의 인쇄 품질을 지정합니다. |
void |
setPrintQuality (PageAttributes.PrintQualityType printQuality)
이러한 속성을 사용하는 페이지의 인쇄 품질을 지정합니다. |
void |
setPrintQualityToDefault ()
이러한 속성을 사용하는 페이지의 인쇄 품질을 디폴트로 설정합니다. |
String |
toString ()
이 PageAttributes 의 캐릭터 라인 표현을 돌려줍니다. |
| 클래스 java.lang. Object 로부터 상속된 메소드 |
|---|
finalize , getClass , notify , notifyAll , wait , wait , wait |
| 생성자 의 상세 |
|---|
public PageAttributes()
public PageAttributes(PageAttributes obj)
obj - 카피 대상의 PageAttributes
public PageAttributes(PageAttributes.ColorType color,
PageAttributes.MediaType media,
PageAttributes.OrientationRequestedType orientationRequested,
PageAttributes.OriginType origin,
PageAttributes.PrintQualityType printQuality,
int[] printerResolution)
color - ColorType.COLOR 또는 ColorType.MONOCHROMEmedia - MediaType 클래스의 1 개의 정수 필드orientationRequested - OrientationRequestedType.PORTRAIT 또는
OrientationRequestedType.LANDSCAPEorigin - OriginType.PHYSICAL 또는 OriginType.PRINTABLEprintQuality - PrintQualityType.DRAFT, PrintQualityType.NORMAL,
또는 PrintQualityType.HIGHprinterResolution - 3 요소의 정수형 배열. 최초의
요소는 0 보다 크지 않으면 안 된다.
2 번째의 요소는 0 보다 크지 않으면 안 된다.
3 번째의 요소는 3 또는 4 가 아니면 안된다
IllegalArgumentException - 상기의 조건의 1 개 이상으로
위반했을 경우| 메소드의 상세 |
|---|
public Object clone()
Object 내의 clone Cloneable public void set(PageAttributes obj)
obj - 카피 대상의 PageAttributespublic PageAttributes.ColorType getColor()
public void setColor(PageAttributes.ColorType color)
color - ColorType.COLOR 또는 ColorType.MONOCHROME
IllegalArgumentException - color 가 null 의 경우public PageAttributes.MediaType getMedia()
public void setMedia(PageAttributes.MediaType media)
media - MediaType 클래스의 1 개의 정수 필드
IllegalArgumentException - media 가 null 의 경우public void setMediaToDefault()
public PageAttributes.OrientationRequestedType getOrientationRequested()
public void setOrientationRequested(PageAttributes.OrientationRequestedType orientationRequested)
orientationRequested - OrientationRequestedType.PORTRAIT 또는
OrientationRequestedType.LANDSCAPE
IllegalArgumentException - orientationRequested 가 null 의 경우public void setOrientationRequested(int orientationRequested)
3 을 지정하면(자) 세로 방향,4 를 지정하면(자) 횡방향이 됩니다. 다른 값을 지정하면(자) IllegalArgumentException 가 throw 됩니다. 프로퍼티으로 지정하지 않는 경우는, setOrientationRequested(OrientationRequestedType.PORTRAIT)가 불려 갑니다.
orientationRequested - 3 또는 4
IllegalArgumentException - orientationRequested 가
3 또는 4 가 아닌 경우public void setOrientationRequestedToDefault()
public PageAttributes.OriginType getOrigin()
public void setOrigin(PageAttributes.OriginType origin)
origin - OriginType.PHYSICAL 또는 OriginType.PRINTABLE
IllegalArgumentException - origin 가 null 의 경우public PageAttributes.PrintQualityType getPrintQuality()
public void setPrintQuality(PageAttributes.PrintQualityType printQuality)
printQuality - PrintQualityType.DRAFT, PrintQualityType.NORMAL,
또는 PrintQualityType.HIGH
IllegalArgumentException - printQuality 가 null 의 경우public void setPrintQuality(int printQuality)
3 을 지정하면(자) 드래프트,4 를 지정하면(자) 일반적으로,5 를 지정하면(자) 고품질이 됩니다. 다른 값을 지정하면(자) IllegalArgumentException 가 throw 됩니다. 프로퍼티으로 지정하지 않는 경우는, setPrintQuality(PrintQualityType.NORMAL)가 불려 갑니다.
printQuality - 3,4 또는 5
IllegalArgumentException - printQuality 가
3,4, 또는 5 가 아닌 경우public void setPrintQualityToDefault()
public int[] getPrinterResolution()
3 은 1 인치 당의 닷수,4 는 1 센치 당의 닷수가 됩니다.
3 또는 4 가 아니면 안된다public void setPrinterResolution(int[] printerResolution)
3 은 1 인치 당의 닷수,4 는 1 센치 당의 닷수가 됩니다. 1.1 인쇄 구현 (Toolkit.getPrintJob)에서는, 보내는 방법향의 해상도와 전후송의 해상도는 같은 필요가 있습니다. 프로퍼티으로 지정하지 않는 경우는, setPrinterResolution(72)가 불려 갑니다.
printerResolution - 3 요소의 정수형 배열. 최초의
요소는 0 보다 크지 않으면 안 된다.
2 번째의 요소는 0 보다 크지 않으면 안 된다.
3 번째의 요소는 3 또는 4 가 아니면 안된다
IllegalArgumentException - 상기의 조건의 1 개 이상으로
위반했을 경우public void setPrinterResolution(int printerResolution)
72 가 지정됩니다.
printerResolution - 0 보다 큰 정수치
IllegalArgumentException - printerResolution 가
0 이하의 경우public void setPrinterResolutionToDefault()
public boolean equals(Object obj)
서로의 속성이 모두 같은 경우에만, 2 개의 PageAttributes 는 동일해집니다. 필드가 일의의 같은 열거 객체를 참조하고 있는 경우에만, 열거형의 속성이 동일해집니다. 즉, 별명의 미디어는, 바탕으로 되는 일의의 미디어와 같다라고 말하는 것입니다. 보내 해상도, 전후 보내 해상도 및 단위가 같은 경우에만, 프린터의 해상도가 동일해집니다.
Object 내의 equals obj - 같은지 어떤지가 판정되는 객체
Object.hashCode() ,
Hashtable public int hashCode()
Object 내의 hashCode Object.equals(java.lang.Object) ,
Hashtable public String toString()
Object 내의 toString
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 전의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요 : 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 | |||||||||
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.