Package org.gnome.gtk
Class Printer.Builder<B extends Printer.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gtk.Printer.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
Printer
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building thePrinter
object.Emitted in response to a request for detailed information about a printer from the print backend.setAcceptsPdf
(boolean acceptsPdf) true
if this printer can accept PDF.setAcceptsPs
(boolean acceptsPs) true
if this printer can accept PostScript.setBackend
(MemorySegment backend) The backend for the printer.setIsVirtual
(boolean isVirtual) false
if this represents a real hardware device.The name of the printer.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building thePrinter
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toPrinter
.- Overrides:
build
in classGObject.Builder<B extends Printer.Builder<B>>
- Returns:
- a new instance of
Printer
with the properties that were set in the Builder object. - Throws:
UnsupportedPlatformException
- when run on an unsupported platform
-
setAcceptsPdf
true
if this printer can accept PDF.- Parameters:
acceptsPdf
- the value for theaccepts-pdf
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setAcceptsPs
true
if this printer can accept PostScript.- Parameters:
acceptsPs
- the value for theaccepts-ps
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setBackend
The backend for the printer.- Parameters:
backend
- the value for thebackend
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setIsVirtual
false
if this represents a real hardware device.- Parameters:
isVirtual
- the value for theis-virtual
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setName
-
onDetailsAcquired
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:
-