Package org.gnome.gtk
Class FileLauncher.Builder<B extends FileLauncher.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gtk.FileLauncher.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
FileLauncher
public static class FileLauncher.Builder<B extends FileLauncher.Builder<B>>
extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theFileLauncher
object.setAlwaysAsk
(boolean alwaysAsk) Whether to ask the user to choose an app for opening the file.The file to launch.setWritable
(boolean writable) Whether to make the file writable for the handler.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 theFileLauncher
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 toFileLauncher
.- Overrides:
build
in classGObject.Builder<B extends FileLauncher.Builder<B>>
- Returns:
- a new instance of
FileLauncher
with the properties that were set in the Builder object.
-
setAlwaysAsk
Whether to ask the user to choose an app for opening the file. IfFALSE
, the file might be opened with a default app or the previous choice.- Parameters:
alwaysAsk
- the value for thealways-ask
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setFile
-
setWritable
Whether to make the file writable for the handler.- Parameters:
writable
- the value for thewritable
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-