Package org.gnome.gtk
Class Application.Builder<B extends Application.Builder<B>>
java.lang.Object
org.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gio.Application.Builder<B>
org.gnome.gtk.Application.Builder<B>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Direct Known Subclasses:
Application.Builder
- Enclosing class:
Application
public static class Application.Builder<B extends Application.Builder<B>>
extends Application.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theApplicationobject.onQueryEnd(Application.QueryEndCallback handler) Emitted when the session manager is about to end the session.Emitted when a window is added to an application.Emitted when a window is removed from an application.setMenubar(MenuModel menubar) The menu model to be used for the application's menu bar.setRegisterSession(boolean registerSession) Deprecated.This property is ignored.Methods inherited from class org.gnome.gio.Application.Builder
onActivate, onCommandLine, onHandleLocalOptions, onNameLost, onOpen, onShutdown, onStartup, setActionGroup, setApplicationId, setFlags, setFlags, setInactivityTimeout, setResourceBasePath, setVersionMethods 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 theApplicationobject. 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 toApplication.- Overrides:
buildin classApplication.Builder<B extends Application.Builder<B>>- Returns:
- a new instance of
Applicationwith the properties that were set in the Builder object.
-
setMenubar
-
setRegisterSession
Deprecated.This property is ignored. GTK always registers with the session managerSet this property to true to register with the session manager.This will make GTK track the session state (such as the
Gtk.Application:screensaver-activeproperty).- Parameters:
registerSession- the value for theregister-sessionproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
onQueryEnd
Emitted when the session manager is about to end the session.Applications can connect to this signal and call
Application.inhibit(org.gnome.gtk.Window, java.util.Set<org.gnome.gtk.ApplicationInhibitFlags>, java.lang.String)withGtk.ApplicationInhibitFlags.logoutto delay the end of the session until state has been saved.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onWindowAdded
Emitted when a window is added to an application.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onWindowRemoved
Emitted when a window is removed from an application.This can happen as a side-effect of the window being destroyed or explicitly through
Application.removeWindow(org.gnome.gtk.Window).- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-