public final class JobSettings extends Object
PrinterJobの説明にあるように、そのジョブにインストールされたJobSettingsは当初、そのジョブに当初関連付けられているプリンタの現在のデフォルト設定を反映しています。
JobSettingsの委譲はジョブが存在する間変わらず、そのメンバー・プロパティはジョブのPrinterの変更と互換性を持たせるように更新されます。たとえば、プラットフォームのダイアログを介したユーザー操作の結果として、などです。設定に互換性がない場合、新しいプリンタの設定は通常、デフォルトに戻ります。
ダイアログでのユーザー操作によって、設定が暗黙的または明示的に更新された場合、ユーザーが「確定」オプションを使用してダイアログを終了することで設定を承認すると、更新内容がアプリケーションに伝播されて参照可能になります。
ほとんどの印刷アプリケーションでは、ユーザーが目的のオプションを設定できて、そのオプションがジョブに伝播されれば十分であると考えられます。これを必要とするアプリケーション用に、個々のオプションに対してsetterおよびgetterメソッド(プロパティとしても使用可能)が用意されており、設定値の変更はこれらのプロパティを介して監視および更新できます。
すべての設定値がすべてのプリンタで使用できるわけではありません。たとえば、両面印刷をサポートしていないプリンタもあります。サポートされる設定の判別方法については、Printer
クラスを参照してください。
型 | プロパティと説明 |
---|---|
ObjectProperty<Collation> |
collation
Collation のインスタンスを表すプロパティ。 |
IntegerProperty |
copies
ジョブの印刷部数を表す
IntegerProperty 。 |
StringProperty |
jobName
ジョブの名前を表す
StringProperty 。 |
ObjectProperty<PageLayout> |
pageLayout
PageLayout のインスタンスを表すプロパティ。 |
ObjectProperty |
pageRanges
印刷するジョブ・ページをPageRangeの配列として表す値を持つ
ObjectProperty 。 |
ObjectProperty<PaperSource> |
paperSource
PaperSource のインスタンスを表すプロパティ。 |
ObjectProperty<PrintColor> |
printColor
PrintColor のインスタンスを表すプロパティ。 |
ObjectProperty<PrintQuality> |
printQuality
PrintQuality のインスタンスを表すプロパティ。 |
ObjectProperty<PrintResolution> |
printResolution
PrintResolution のインスタンスを表すプロパティ。 |
ObjectProperty<PrintSides> |
printSides
PrintSides のインスタンスを表すプロパティ。 |
修飾子と型 | メソッドと説明 |
---|---|
ObjectProperty<Collation> |
collationProperty()
Collation のインスタンスを表すプロパティ。 |
IntegerProperty |
copiesProperty()
ジョブの印刷部数を表す
IntegerProperty 。 |
Collation |
getCollation()
Collationは、ドキュメントを複数部印刷する際の用紙のソート方法を決定します。
|
int |
getCopies() |
String |
getJobName() |
PageLayout |
getPageLayout()
このジョブの現在のページ・レイアウトを取得します。
|
PageRange[] |
getPageRanges()
印刷するページの範囲。
|
PaperSource |
getPaperSource()
プロパティpaperSourceの値を取得します。
|
PrintColor |
getPrintColor()
プロパティprintColorの値を取得します。
|
PrintQuality |
getPrintQuality()
プロパティprintQualityの値を取得します。
|
PrintResolution |
getPrintResolution() |
PrintSides |
getPrintSides()
プリンタがサポートしている場合は、ジョブをメディア(紙)の両面に印刷できます(両面印刷)。
|
StringProperty |
jobNameProperty()
ジョブの名前を表す
StringProperty 。 |
ObjectProperty<PageLayout> |
pageLayoutProperty()
PageLayout のインスタンスを表すプロパティ。 |
ObjectProperty |
pageRangesProperty()
印刷するジョブ・ページをPageRangeの配列として表す値を持つ
ObjectProperty 。 |
ObjectProperty<PaperSource> |
paperSourceProperty()
PaperSource のインスタンスを表すプロパティ。 |
ObjectProperty<PrintColor> |
printColorProperty()
PrintColor のインスタンスを表すプロパティ。 |
ObjectProperty<PrintQuality> |
printQualityProperty()
PrintQuality のインスタンスを表すプロパティ。 |
ObjectProperty<PrintResolution> |
printResolutionProperty()
PrintResolution のインスタンスを表すプロパティ。 |
ObjectProperty<PrintSides> |
printSidesProperty()
PrintSides のインスタンスを表すプロパティ。 |
void |
setCollation(Collation collation)
Collation プロパティを設定します。 |
void |
setCopies(int nCopies) |
void |
setJobName(String name) |
void |
setPageLayout(PageLayout pageLayout)
使用するPageLayoutを設定します。
|
void |
setPageRanges(PageRange... pages)
PageRangeの配列として表した、印刷するページの範囲。
|
void |
setPaperSource(PaperSource value)
プロパティpaperSourceの値を設定します。
|
void |
setPrintColor(PrintColor color)
PrintColor プロパティを設定します。 |
void |
setPrintQuality(PrintQuality quality)
PrintQuality プロパティを設定します。 |
void |
setPrintResolution(PrintResolution resolution)
PrintResolution プロパティを設定します。 |
void |
setPrintSides(PrintSides sides)
両面印刷を制御する
PrintSides プロパティを設定します。 |
String |
toString() |
public final StringProperty jobNameProperty
StringProperty
。getJobName()
, setJobName(String)
public final IntegerProperty copiesProperty
IntegerProperty
。getCopies()
, setCopies(int)
public final ObjectProperty pageRangesProperty
ObjectProperty
。null値を指定すると、すべてのページが印刷されます。それ以外の場合は、ページ番号の昇順に並べられた、PageRangeインスタンスの重複しない配列を指定する必要があります。ページ番号は1から始まります。空の配列はnullの配列と同等と見なされます。
無効な、または(プリンタで)サポートされないページ範囲のセットは無視されます。
範囲が、印刷時にジョブによってレンダリングされるページ数を超えていても、エラーは発生しません。
public final ObjectProperty<PrintSides> printSidesProperty
PrintSides
のインスタンスを表すプロパティ。public final ObjectProperty<Collation> collationProperty
Collation
のインスタンスを表すプロパティ。public final ObjectProperty<PrintColor> printColorProperty
PrintColor
のインスタンスを表すプロパティ。public final ObjectProperty<PrintQuality> printQualityProperty
PrintQuality
のインスタンスを表すプロパティ。public final ObjectProperty<PrintResolution> printResolutionProperty
PrintResolution
のインスタンスを表すプロパティ。public final ObjectProperty<PaperSource> paperSourceProperty
PaperSource
のインスタンスを表すプロパティ。public final ObjectProperty<PageLayout> pageLayoutProperty
PageLayout
のインスタンスを表すプロパティ。public final StringProperty jobNameProperty()
StringProperty
。getJobName()
, setJobName(String)
public String getJobName()
public void setJobName(String name)
name
- ジョブの名前を表す文字列。public final IntegerProperty copiesProperty()
IntegerProperty
。getCopies()
, setCopies(int)
public int getCopies()
public final void setCopies(int nCopies)
nCopies
- 印刷部数。public final ObjectProperty pageRangesProperty()
ObjectProperty
。null値を指定すると、すべてのページが印刷されます。それ以外の場合は、ページ番号の昇順に並べられた、PageRangeインスタンスの重複しない配列を指定する必要があります。ページ番号は1から始まります。空の配列はnullの配列と同等と見なされます。
無効な、または(プリンタで)サポートされないページ範囲のセットは無視されます。
範囲が、印刷時にジョブによってレンダリングされるページ数を超えていても、エラーは発生しません。
public PageRange[] getPageRanges()
pageRangesProperty
を参照してください。public void setPageRanges(PageRange... pages)
((PageRange[])null)
は常にすべてのページを意味しますが、これはデフォルトであるため、あまり使用されません。詳細は、pageRangesProperty
を参照してください。pages
- nullまたは上で指定した可変引数配列public final ObjectProperty<PrintSides> printSidesProperty()
PrintSides
のインスタンスを表すプロパティ。public PrintSides getPrintSides()
public void setPrintSides(PrintSides sides)
PrintSides
プロパティを設定します。null値は無視されます。sides
- 面数の新しい設定。public final ObjectProperty<Collation> collationProperty()
Collation
のインスタンスを表すプロパティ。public Collation getCollation()
false)が通常のデフォルト値です。
public void setCollation(Collation collation)
Collation
プロパティを設定します。null値は無視されます。collation
- 丁合いの新しい設定public final ObjectProperty<PrintColor> printColorProperty()
PrintColor
のインスタンスを表すプロパティ。public PrintColor getPrintColor()
PrintColor
のインスタンスを表すプロパティ。public void setPrintColor(PrintColor color)
PrintColor
プロパティを設定します。null値は無視されます。
color
- 印刷色の新しい設定。public final ObjectProperty<PrintQuality> printQualityProperty()
PrintQuality
のインスタンスを表すプロパティ。public PrintQuality getPrintQuality()
PrintQuality
のインスタンスを表すプロパティ。public void setPrintQuality(PrintQuality quality)
PrintQuality
プロパティを設定します。null値は無視されます。
品質と解像度は重複する概念です。そのため、プリンタによっては、両方ではなくいずれか一方のみをサポートしている場合もあります。これらをプログラム的に設定するアプリケーションでは、両方のプロパティを問い合せて、サポートされる値から適宜選択してください。プリンタが非標準の値をサポートしている場合、それらの値のプリンタによる解釈をコードが判別できない可能性があるため、常に要件に合致する標準値から選択するのが最も安全です。
quality
- 印刷品質の新しい設定。public final ObjectProperty<PrintResolution> printResolutionProperty()
PrintResolution
のインスタンスを表すプロパティ。public PrintResolution getPrintResolution()
public void setPrintResolution(PrintResolution resolution)
PrintResolution
プロパティを設定します。null値は無視されます。
品質と解像度は重複する概念です。そのため、プリンタによっては、両方ではなくいずれか一方のみをサポートしている場合もあります。これらをプログラム的に設定するアプリケーションでは、両方のプロパティを問い合せて、サポートされる値から適宜選択してください。プリンタが非標準の値をサポートしている場合、それらの値のプリンタによる解釈をコードが判別できない可能性があるため、常に要件に合致する標準値から選択するのが最も安全です。
resolution
- 印刷解像度の新しい設定。public final ObjectProperty<PaperSource> paperSourceProperty()
PaperSource
のインスタンスを表すプロパティ。public PaperSource getPaperSource()
PaperSource
のインスタンスを表すプロパティ。public void setPaperSource(PaperSource value)
PaperSource
のインスタンスを表すプロパティ。public final ObjectProperty<PageLayout> pageLayoutProperty()
PageLayout
のインスタンスを表すプロパティ。public PageLayout getPageLayout()
public void setPageLayout(PageLayout pageLayout)
pageLayout
- 使用するページ・レイアウト。Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.