Class Printer.Builder<B extends Printer.Builder<B>>

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

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

      public B setAcceptsPdf(boolean acceptsPdf)
      true if this printer can accept PDF.
      Parameters:
      acceptsPdf - the value for the accepts-pdf property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setAcceptsPs

      public B setAcceptsPs(boolean acceptsPs)
      true if this printer can accept PostScript.
      Parameters:
      acceptsPs - the value for the accepts-ps property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setBackend

      public B setBackend(MemorySegment backend)
      The backend for the printer.
      Parameters:
      backend - the value for the backend property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setIsVirtual

      public B setIsVirtual(boolean isVirtual)
      false if this represents a real hardware device.
      Parameters:
      isVirtual - the value for the is-virtual property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setName

      public B setName(String name)
      The name of the printer.
      Parameters:
      name - the value for the name property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onDetailsAcquired

      public B onDetailsAcquired(Printer.DetailsAcquiredCallback handler)

      Emitted in response to a request for detailed information about a printer from the print backend.

      The success parameter indicates if the information was actually obtained.

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