public static class PrintingService.PrinterSetupDialog
extends java.lang.Object
Each public method emulates an option of the statement. They do a quick validation. If successful they return a reference to this object to allow other method to be chained.
The execute() method does the final checks, send the request with gathered options
to client, awaits the user to interact and finally sets up the response and confirmation
variable update.
| Modifier and Type | Field and Description |
|---|---|
private int |
copyCount
The initial number of copies in the
Print dialog box. |
private handle |
inWindow
Specifies the parent window for the dialog box to be displayed.
|
private int |
orientation
The orientation of the paper.
|
private logical |
toUpdate
A logical variable used as output parameter that will contain the status of the user's
dialog interaction: if the user validates it by selecting the
OK button, the
value of the variable is set to TRUE on return. |
| Constructor and Description |
|---|
PrinterSetupDialog() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Instruct the client to show the
Printer Setup dialog using the configured options
using previously chained methods. |
PrintingService.PrinterSetupDialog |
setCopyCount(int64 count)
Configures initial number of copies in the
Print dialog box. |
PrintingService.PrinterSetupDialog |
setCopyCount(long count)
Configures the initial number of copies in the
Print dialog box. |
PrintingService.PrinterSetupDialog |
setOrientation(int orientation)
Configures the orientation of the page in dialog.
|
PrintingService.PrinterSetupDialog |
setWindow(handle window)
Configures the dialog to be created as child of a certain window.
|
PrintingService.PrinterSetupDialog |
update(logical update)
Configures the output variable to be set when the selection dialog is closed.
|
private int copyCount
Print dialog box. The user can directly
change this value in the dialog box. This option is supported only if the printer drivers
support multi-copy printing. In rare cases when they don't, the field is disabled.private int orientation
private logical toUpdate
OK button, the
value of the variable is set to TRUE on return. If the user rejects the dialog by
pressing the Cancel button, the variable's value on return will be FALSE.private handle inWindow
public PrintingService.PrinterSetupDialog setCopyCount(int64 count)
Print dialog box.count - The initial number of copies in the Print dialog box.PrinterSetupDialog. Used for chaining.copyCountpublic PrintingService.PrinterSetupDialog setCopyCount(long count)
Print dialog box.count - The initial number of copies in the Print dialog box.PrinterSetupDialog. Used for chaining.copyCountpublic PrintingService.PrinterSetupDialog setOrientation(int orientation)
orientation - The new default page orientation.PrinterSetupDialog. Used for chaining.orientationpublic PrintingService.PrinterSetupDialog update(logical update)
update - A variable that will hold the return status of the dialog. That is true
if the dialog was accepted and false otherwise.PrinterSetupDialog. Used for chaining.toUpdatepublic PrintingService.PrinterSetupDialog setWindow(handle window)
window - A handle to a window that will be the parent of the dialog. The handle must
refer a window or an error condition will be issued.PrinterSetupDialog. Used for chaining.inWindowpublic void execute()
Printer Setup dialog using the configured options
using previously chained methods. When the client returns, update the toUpdate
variable, if set, to let the programmer whether the client accepted the dialog or
rejected it.