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
Specifies the initial value of the Copies field in the Print dialog box.
|
private handle |
inWindow
Specifies the window from which the dialog box is displayed.
|
private int |
orientation
The orientation of the paper.
|
private logical |
toUpdate
A logical variable to return the status of the user’s dialog interaction.
|
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 the initial value of the Copies field in the Print dialog box.
|
PrintingService.PrinterSetupDialog |
setCopyCount(long count)
Configures the initial value of the Copies field 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 windows.
|
PrintingService.PrinterSetupDialog |
update(logical update)
Configures the variable to be set when the selection dialog is closed.
|
private int copyCount
private int orientation
private logical toUpdate
private handle inWindow
public PrintingService.PrinterSetupDialog setCopyCount(int64 count)
count
- The number of pages in Copies field.PrinterSetupDialog
. Used for chaining.copyCount
public PrintingService.PrinterSetupDialog setCopyCount(long count)
count
- The number of pages in Copies field.PrinterSetupDialog
. Used for chaining.copyCount
public PrintingService.PrinterSetupDialog setOrientation(int orientation)
orientation
- The new default page orientation.PrinterSetupDialog
. Used for chaining.orientation
public PrintingService.PrinterSetupDialog update(logical update)
update
- A variable that will hold the status of the dialog.PrinterSetupDialog
. Used for chaining.toUpdate
public PrintingService.PrinterSetupDialog setWindow(handle window)
window
- A handle to a window that will be the parent of the dialog.PrinterSetupDialog
. Used for chaining.inWindow
public 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.