Class PrintOperation.Builder<B extends PrintOperation.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
PrintOperation

public static class PrintOperation.Builder<B extends PrintOperation.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public PrintOperation build()
      Finish building the PrintOperation object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to PrintOperation.
      Overrides:
      build in class GObject.Builder<B extends PrintOperation.Builder<B>>
      Returns:
      a new instance of PrintOperation with the properties that were set in the Builder object.
    • setPageSetup

      public B setPageSetup(PageSetup pageSetup)
      The initial GtkPageSetup for the print operation.
      Parameters:
      pageSetup - the value for the page-setup property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setPrintSettings

      public B setPrintSettings(PrintSettings printSettings)
      The initial GtkPrintSettings for the print operation.
      Parameters:
      printSettings - the value for the print-settings property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setWebView

      public B setWebView(WebView webView)
      The WebKitWebView that will be printed.
      Parameters:
      webView - the value for the web-view property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onFailed

      public B onFailed(PrintOperation.FailedCallback handler)
      Emitted when an error occurs while printing. The given error, of the domain WEBKIT_PRINT_ERROR, contains further details of the failure. The WebKitPrintOperation::finished signal is emitted after this one.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onFinished

      public B onFinished(PrintOperation.FinishedCallback handler)
      Emitted when the print operation has finished doing everything required for printing.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: