DocumentPrintAttributeSet

Inheritance: java.lang.Object, javax.print.attribute.HashAttributeSet

public final class DocumentPrintAttributeSet extends HashAttributeSet

AttributeSet 用のユーザーフレンドリーなインターフェイスを備えたヘルパークラスを表します。

コンストラクタ

コンストラクタ説明
DocumentPrintAttributeSet(int copies)DocumentPrintAttributeSet の新しいインスタンスを初期化します。
DocumentPrintAttributeSet(String printerName, int copies)DocumentPrintAttributeSet の新しいインスタンスを初期化します。
DocumentPrintAttributeSet(String printerName)DocumentPrintAttributeSet の新しいインスタンスを初期化します。
DocumentPrintAttributeSet()DocumentPrintAttributeSet の新しいインスタンスを初期化します。

メソッド

メソッド説明
getCopies()
getLandscape()
getPrinterName()
setCollate(boolean value)文書が段組みされているかどうかを示す値を設定します。
setCopies(int value)印刷する部数を設定します。
setDuplex(boolean value)両面印刷のプリンター設定を指定します。
setLandscape(boolean value)ページの向きを設定します。
setPrintRange(int page)印刷する単一ページを設定します。
setPrintRange(int from, int to)印刷するページ範囲を設定します。
setPrinterName(String printerName)使用するプリンターの名前です。
setPrinterName(String printerName, Locale locale)使用するプリンターの名前です。

DocumentPrintAttributeSet(int copies)

public DocumentPrintAttributeSet(int copies)

DocumentPrintAttributeSet の新しいインスタンスを初期化します。デフォルトでは文書のすべてのページが印刷されます。

Parameters:

パラメーター説明
部数int印刷する文書の部数です。

DocumentPrintAttributeSet(String printerName, int copies)

public DocumentPrintAttributeSet(String printerName, int copies)

DocumentPrintAttributeSet の新しいインスタンスを初期化します。デフォルトでは文書のすべてのページが印刷されます。

Parameters:

パラメーター説明
printerNamejava.lang.Stringプリンターの名前です。
部数int印刷する文書の部数です。

DocumentPrintAttributeSet(String printerName)

public DocumentPrintAttributeSet(String printerName)

DocumentPrintAttributeSet の新しいインスタンスを初期化します。デフォルトでは各ページは1部のみです。

Parameters:

パラメーター説明
printerNamejava.lang.Stringプリンターの名前です。

DocumentPrintAttributeSet()

public DocumentPrintAttributeSet()

DocumentPrintAttributeSet の新しいインスタンスを初期化します。デフォルトでは各ページは1部のみです。

getCopies()

public int getCopies()

Returns: int

getLandscape()

public boolean getLandscape()

Returns: boolean

getPrinterName()

public String getPrinterName()

Returns: java.lang.String

setCollate(boolean value)

public void setCollate(boolean value)

文書が段組みされているかどうかを示す値を設定します。

Parameters:

パラメーター説明
booleantrue は SheetCollate.COLLATED の設定に相当し、false は SheetCollate.UNCOLLATED の設定に相当します。

setCopies(int value)

public void setCopies(int value)

印刷する部数を設定します。

Parameters:

パラメーター説明
int印刷する部数です。

setDuplex(boolean value)

public void setDuplex(boolean value)

両面印刷のプリンター設定を指定します。

Parameters:

パラメーター説明
booleantrue は Sides.DUPLEX の設定に相当し、false は Sides.ONE_SIDED の設定に相当します。

setLandscape(boolean value)

public void setLandscape(boolean value)

ページの向きを設定します。

Parameters:

パラメーター説明
booleantrue は OrientationRequested.LANDSCAPE の設定に相当し、false は OrientationRequested.PORTRAIT の設定に相当します。

setPrintRange(int page)

public void setPrintRange(int page)

印刷する単一ページを設定します。

Parameters:

パラメーター説明
ページint印刷するページです。

setPrintRange(int from, int to)

public void setPrintRange(int from, int to)

印刷するページ範囲を設定します。

Parameters:

パラメーター説明
からint最初のページです。
までint最後のページ。

setPrinterName(String printerName)

public void setPrinterName(String printerName)

使用するプリンターの名前です。

Parameters:

パラメーター説明
printerNamejava.lang.Stringプリンターの名前です。

setPrinterName(String printerName, Locale locale)

public void setPrinterName(String printerName, Locale locale)

使用するプリンターの名前です。

Parameters:

パラメーター説明
printerNamejava.lang.Stringプリンターの名前です。
ロケールjava.util.LocaleprinterName のロケール。