Package org.gnome.gtk
Class NativeDialog.Builder<B extends NativeDialog.Builder<B>>
java.lang.Object
org.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theNativeDialogobject.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, ornullfor none.setVisible(boolean visible) Whether the window is currently visible.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theNativeDialogobject. 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:
buildin classGObject.Builder<B extends NativeDialog.Builder<B>>- Returns:
- a new instance of
NativeDialogwith 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 themodalproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setTitle
-
setTransientFor
-
setVisible
Whether the window is currently visible.- Parameters:
visible- the value for thevisibleproperty- Returns:
- the
Builderinstance 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
Builderinstance is returned, to allow method chaining - See Also:
-