Class PrintJob.Builder<B extends PrintJob.Builder<B>>

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

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

      public B setPageSetup(PageSetup pageSetup)
      Page setup.
      Parameters:
      pageSetup - the value for the page-setup property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setPrinter

      public B setPrinter(Printer printer)
      The printer to send the job to.
      Parameters:
      printer - the value for the printer property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSettings

      public B setSettings(PrintSettings settings)
      Printer settings.
      Parameters:
      settings - the value for the settings property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTitle

      public B setTitle(String title)
      The title of the print job.
      Parameters:
      title - the value for the title property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTrackPrintStatus

      public B setTrackPrintStatus(boolean trackPrintStatus)
      true if the print job will continue to emit status-changed signals after the print data has been setn to the printer.
      Parameters:
      trackPrintStatus - the value for the track-print-status property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onStatusChanged

      public B onStatusChanged(PrintJob.StatusChangedCallback handler)

      Emitted when the status of a job changes.

      The signal handler can use PrintJob.getStatus() to obtain the new status.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: