Package org.gnome.gtk
Class NativeDialog.Builder<B extends NativeDialog.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gtk.NativeDialog.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Direct Known Subclasses:
FileChooserNative.Builder
- Enclosing class:
NativeDialog
public static class NativeDialog.Builder<B extends NativeDialog.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 theNativeDialog
object.onResponse
(NativeDialog.ResponseCallback handler) Emitted when the user responds to the dialog.setModal
(boolean modal) Whether the window should be modal with respect to its transient parent.The title of the dialog windowsetTransientFor
(Window transientFor) The transient parent of the dialog, ornull
for none.setVisible
(boolean visible) Whether the window is currently visible.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 theNativeDialog
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 toNativeDialog
.- Overrides:
build
in classGObject.Builder<B extends NativeDialog.Builder<B>>
- Returns:
- a new instance of
NativeDialog
with the properties that were set in the Builder object.
-
setModal
Whether the window should be modal with respect to its transient parent.- Parameters:
modal
- the value for themodal
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTitle
-
setTransientFor
-
setVisible
Whether the window is currently visible.- Parameters:
visible
- the value for thevisible
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onResponse
Emitted when the user responds to the dialog.When this is called the dialog has been hidden.
If you call
NativeDialog.hide()
before the user responds to the dialog this signal will not be emitted.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-