As documented on PrinterJob, the JobSettings installed on that job will initially reflect the current default settings for the initially associated printer for that job.
The JobSettings delegate then remains the same for the life of the job, and will have it's member properties updated to be compatible with a change in Printer on the job. For example as a result of a user interaction via a platform's dialog. An incompatible setting will usually cause the setting to revert to the default for the new printer.
Any implicit or explicit updates to settings resulting from the user interaction with dialog will be propagated and visible to the application once the user approves the settings by dismissing the dialog using its "accept" option.
For most printing applications it is likely sufficient to let the user set the desired options and have these propagated to the job. For applications which need them, there are setter and getter methods for the individual options, which are also available as properties, and change in values of settings may be monitored and updated via these properties.
Not all values of settings are available on all printers. For example
a printer may not support two-sided printing.
See the Printer class for how to
to determine supported settings.
| Modifier and Type | Field and Description |
|---|---|
| private ObjectProperty | |
| private ObjectProperty | |
| private IntegerProperty | |
| private static final String | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private PrinterJob | |
| private SimpleStringProperty | |
| private ObjectProperty | |
| private Collation | |
| private int | |
| private PageLayout | |
| private PaperSource | |
| private PrintColor | |
| private PrintQuality | |
| private PrintResolution | |
| private PrintSides | |
| private SimpleStringProperty | |
| private ObjectProperty | |
| private ObjectProperty | |
| private Printer | |
| private PrinterAttributes | |
| private ObjectProperty | |
| private ObjectProperty | |
| private ObjectProperty |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final ObjectProperty | |
| public final IntegerProperty | Returns: the number of copies of the job to print
|
| public final Collation | |
| public final int | |
| public final String | |
| public final String | |
| public final PageLayout | |
| public final PageRange[] | |
| public final PaperSource | |
| public final PrintColor | |
| public final PrintQuality | |
| public final PrintResolution | |
| public final PrintSides | |
| private boolean | |
| public final StringProperty | |
| public final StringProperty | Returns: the name of a printer spool fileA |
| public final ObjectProperty | Returns: an instance ofPageLayoutProperty representing an instance of |
| public final ObjectProperty | Returns: the value presents the job pages to print as an array of PageRangeAn |
| public final ObjectProperty | Returns: an instance ofPaperSourceProperty representing an instance of |
| public final ObjectProperty | Returns: an instance ofPrintColorProperty representing an instance of |
| public final ObjectProperty | Returns: an instance ofPrintQualityProperty representing an instance of |
| public final ObjectProperty | Returns: an instance ofPrintResolutionProperty representing an instance of |
| public final ObjectProperty | Returns: an instance ofPrintSidesProperty representing an instance of |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | setPageRanges(PageRange...
null or a varargs array as specified above pages)The range of pages to print as an array of PageRange. |
| public final void | |
| public final void | |
| pack-priv void | |
| public final void | |
| public final void | |
| public final void | |
| public String | |
| pack-priv void | updateForPrinter(Printer printer)
If any settings are incompatible with the specified printer, they are updated to be compatible. |
| collation | back to summary |
|---|---|
| private ObjectProperty<Collation> collation | |
| color | back to summary |
|---|---|
| private ObjectProperty<PrintColor> color | |
| copies | back to summary |
|---|---|
| private IntegerProperty copies | |
| DEFAULT_JOBNAME | back to summary |
|---|---|
| private static final String DEFAULT_JOBNAME | |
| defaultCollation | back to summary |
|---|---|
| private boolean defaultCollation | |
| defaultCopies | back to summary |
|---|---|
| private boolean defaultCopies | |
| defaultPageLayout | back to summary |
|---|---|
| private boolean defaultPageLayout | |
| defaultPaperSource | back to summary |
|---|---|
| private boolean defaultPaperSource | |
| defaultPrintColor | back to summary |
|---|---|
| private boolean defaultPrintColor | |
| defaultPrintQuality | back to summary |
|---|---|
| private boolean defaultPrintQuality | |
| defaultPrintResolution | back to summary |
|---|---|
| private boolean defaultPrintResolution | |
| defaultSides | back to summary |
|---|---|
| private boolean defaultSides | |
| hasOldCollation | back to summary |
|---|---|
| private boolean hasOldCollation | |
| hasOldCopies | back to summary |
|---|---|
| private boolean hasOldCopies | |
| hasOldPageLayout | back to summary |
|---|---|
| private boolean hasOldPageLayout | |
| hasOldPaperSource | back to summary |
|---|---|
| private boolean hasOldPaperSource | |
| hasOldPrintColor | back to summary |
|---|---|
| private boolean hasOldPrintColor | |
| hasOldPrintQuality | back to summary |
|---|---|
| private boolean hasOldPrintQuality | |
| hasOldPrintResolution | back to summary |
|---|---|
| private boolean hasOldPrintResolution | |
| hasOldSides | back to summary |
|---|---|
| private boolean hasOldSides | |
| job | back to summary |
|---|---|
| private PrinterJob job | |
| jobName | back to summary |
|---|---|
| private SimpleStringProperty jobName | |
| layout | back to summary |
|---|---|
| private ObjectProperty<PageLayout> layout | |
| oldCollation | back to summary |
|---|---|
| private Collation oldCollation | |
| oldCopies | back to summary |
|---|---|
| private int oldCopies | |
| oldPageLayout | back to summary |
|---|---|
| private PageLayout oldPageLayout | |
| oldPaperSource | back to summary |
|---|---|
| private PaperSource oldPaperSource | |
| oldPrintColor | back to summary |
|---|---|
| private PrintColor oldPrintColor | |
| oldPrintQuality | back to summary |
|---|---|
| private PrintQuality oldPrintQuality | |
| oldPrintResolution | back to summary |
|---|---|
| private PrintResolution oldPrintResolution | |
| oldSides | back to summary |
|---|---|
| private PrintSides oldSides | |
| outputFile | back to summary |
|---|---|
| private SimpleStringProperty outputFile | |
| pageRanges | back to summary |
|---|---|
| private ObjectProperty<PageRange[]> pageRanges | |
| paperSource | back to summary |
|---|---|
| private ObjectProperty<PaperSource> paperSource | |
| printer | back to summary |
|---|---|
| private Printer printer | |
| printerCaps | back to summary |
|---|---|
| private PrinterAttributes printerCaps | |
| quality | back to summary |
|---|---|
| private ObjectProperty<PrintQuality> quality | |
| resolution | back to summary |
|---|---|
| private ObjectProperty<PrintResolution> resolution | |
| sides | back to summary |
|---|---|
| private ObjectProperty<PrintSides> sides | |
| JobSettings | back to summary |
|---|---|
| pack-priv JobSettings(Printer printer) | |
| collationProperty | back to summary |
|---|---|
| public final ObjectProperty Property representing an instance of
| |
| copiesProperty | back to summary |
|---|---|
| public final IntegerProperty copiesProperty()
| |
| getCollation | back to summary |
|---|---|
| public final Collation getCollation() | |
| getCopies | back to summary |
|---|---|
| public final int getCopies() | |
| getJobName | back to summary |
|---|---|
| public final String getJobName() | |
| getOutputFile | back to summary |
|---|---|
| public final String getOutputFile() | |
| getPageLayout | back to summary |
|---|---|
| public final PageLayout getPageLayout() | |
| getPageRanges | back to summary |
|---|---|
| public final PageRange[] getPageRanges() | |
| getPaperSource | back to summary |
|---|---|
| public final PaperSource getPaperSource() | |
| getPrintColor | back to summary |
|---|---|
| public final PrintColor getPrintColor() | |
| getPrintQuality | back to summary |
|---|---|
| public final PrintQuality getPrintQuality() | |
| getPrintResolution | back to summary |
|---|---|
| public final PrintResolution getPrintResolution() | |
| getPrintSides | back to summary |
|---|---|
| public final PrintSides getPrintSides() | |
| isJobNew | back to summary |
|---|---|
| private boolean isJobNew() | |
| jobNameProperty | back to summary |
|---|---|
| public final StringProperty jobNameProperty()
| |
| outputFileProperty | back to summary |
|---|---|
| public final StringProperty outputFileProperty() A Applications can use this to programmatically request print-to-file behavior where the native print system is capable of spooling the output to a filesystem file, rather than the printer device. This is often useful where the printer driver generates a format such as Postscript or PDF, and the application intends to distribute the result instead of printing it, or for some other reason the application does not want physical media (paper) emitted by the printer. The default value is an empty string, which is interpreted as unset, equivalent to null, which means output is sent to the printer. So in order to reset to print to the printer, clear the value of this property by setting it to null or an empty string. Additionally if the application displays a printer dialog which allows the user to specify a file destination, including altering an application specified file destination, the value of this property will reflect that user-specified choice, including clearing it to reset to print to the printer, if the user does so. If the print system does not support print-to-file, then this setting will be ignored. If the specified name specifies a non-existent path, or does not specify a user writable file, when printing the results are platform-dependent. Possible behaviours might include replacement with a default output file location, printing to the printer instead, or a platform printing error.
| |
| pageLayoutProperty | back to summary |
|---|---|
| public final ObjectProperty Property representing an instance of
| |
| pageRangesProperty | back to summary |
|---|---|
| public final ObjectProperty An An illegal or unsupported (by the printer) set of page ranges will be ignored. Ranges which exceed beyond the number of pages imaged by the job during printing do not cause any error.
| |
| paperSourceProperty | back to summary |
|---|---|
| public final ObjectProperty Property representing an instance of
| |
| printColorProperty | back to summary |
|---|---|
| public final ObjectProperty Property representing an instance of
| |
| printQualityProperty | back to summary |
|---|---|
| public final ObjectProperty Property representing an instance of Note that quality and resolution are overlapping concepts. Therefore a printer may support setting one, or the other but not both. Applications setting these programmatically should query both properties and select appropriately from the supported values. If a printer supports non-standard values, code likely cannot distinguish the printer's interpretation of these values and it is safest to stick to selecting a standard value that matches the requirement.
| |
| printResolutionProperty | back to summary |
|---|---|
| public final ObjectProperty Property representing an instance of Note that quality and resolution are overlapping concepts. Therefore a printer may support setting one, or the other but not both. Applications setting these programmatically should query both properties and select appropriately from the supported values. If a printer supports non-standard values, code likely cannot distinguish the printer's interpretation of these values and it is safest to stick to selecting a standard value that matches the requirement.
| |
| printSidesProperty | back to summary |
|---|---|
| public final ObjectProperty Property representing an instance of
| |
| setCollation | back to summary |
|---|---|
| public final void setCollation(Collation collation) | |
| setCopies | back to summary |
|---|---|
| public final void setCopies(int nCopies) | |
| setJobName | back to summary |
|---|---|
| public final void setJobName(String name) | |
| setOutputFile | back to summary |
|---|---|
| public final void setOutputFile(String filePath) | |
| setPageLayout | back to summary |
|---|---|
| public final void setPageLayout(PageLayout pageLayout) | |
| setPageRanges | back to summary |
|---|---|
| public final void setPageRanges(PageRange... pages) The range of pages to print as an array of PageRange.
The use of varargs means the common case of a single range
can be auto-boxed.
| |
| setPaperSource | back to summary |
|---|---|
| public final void setPaperSource(PaperSource value) | |
| setPrintColor | back to summary |
|---|---|
| public final void setPrintColor(PrintColor color) | |
| setPrinterJob | back to summary |
|---|---|
| pack-priv void setPrinterJob(PrinterJob job) | |
| setPrintQuality | back to summary |
|---|---|
| public final void setPrintQuality(PrintQuality quality) | |
| setPrintResolution | back to summary |
|---|---|
| public final void setPrintResolution(PrintResolution resolution) | |
| setPrintSides | back to summary |
|---|---|
| public final void setPrintSides(PrintSides sides) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| updateForPrinter | back to summary |
|---|---|
| pack-priv void updateForPrinter(Printer printer) If any settings are incompatible with the specified printer, they are updated to be compatible. This method could be useful as a public one. | |