Class Window.Builder<B extends Window.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
- Direct Known Subclasses:
AboutDialog.Builder
,ApplicationWindow.Builder
,Assistant.Builder
,Dialog.Builder
,MessageDialog.Builder
,ShortcutsWindow.Builder
,Window.Builder
- Enclosing class:
Window
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theWindow
object.Emitted when the user activates the default widget ofwindow
.Emitted when the user activates the currently focused widget ofwindow
.Emitted when the user clicks on the close button of the window.Emitted when the user enables or disables interactive debugging.onKeysChanged
(Window.KeysChangedCallback handler) Deprecated.setApplication
(Application application) TheGtkApplication
associated with the window.The child widget.setDecorated
(boolean decorated) Whether the window should have a frame (also known as *decorations*).setDefaultHeight
(int defaultHeight) The default height of the window.setDefaultWidget
(Widget defaultWidget) The default widget.setDefaultWidth
(int defaultWidth) The default width of the window.setDeletable
(boolean deletable) Whether the window frame should have a close button.setDestroyWithParent
(boolean destroyWithParent) If this window should be destroyed when the parent is destroyed.setDisplay
(Display display) The display that will display this window.setFocusVisible
(boolean focusVisible) Whether 'focus rectangles' are currently visible in this window.setFocusWidget
(Widget focusWidget) The focus widget.setFullscreened
(boolean fullscreened) Whether the window is fullscreen.setHandleMenubarAccel
(boolean handleMenubarAccel) Whether the window frame should handle F10 for activating menubars.setHideOnClose
(boolean hideOnClose) If this window should be hidden when the users clicks the close button.setIconName
(String iconName) Specifies the name of the themed icon to use as the window icon.setMaximized
(boolean maximized) Whether the window is maximized.setMnemonicsVisible
(boolean mnemonicsVisible) Whether mnemonics are currently visible in this window.setModal
(boolean modal) Iftrue
, the window is modal.setResizable
(boolean resizable) Iftrue
, users can resize the window.setStartupId
(String startupId) A write-only property for setting window's startup notification identifier.The title of the window.setTitlebar
(Widget titlebar) The titlebar widget.setTransientFor
(Window transientFor) The transient parent of the window.Methods inherited from class org.gnome.gtk.Widget.Builder
onDestroy, onDirectionChanged, onHide, onKeynavFailed, onMap, onMnemonicActivate, onMoveFocus, onQueryTooltip, onRealize, onShow, onStateFlagsChanged, onUnmap, onUnrealize, setCanFocus, setCanTarget, setCssClasses, setCssName, setCursor, setFocusable, setFocusOnClick, setHalign, setHasTooltip, setHeightRequest, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setReceivesDefault, setSensitive, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setWidthRequest
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.gnome.gtk.Accessible.Builder
setAccessibleRole
Methods inherited from interface io.github.jwharm.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theWindow
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 toWindow
.- Overrides:
build
in classWidget.Builder<B extends Window.Builder<B>>
- Returns:
- a new instance of
Window
with the properties that were set in the Builder object.
-
setApplication
TheGtkApplication
associated with the window.The application will be kept alive for at least as long as it has any windows associated with it (see g_application_hold() for a way to keep it alive without windows).
Normally, the connection between the application and the window will remain until the window is destroyed, but you can explicitly remove it by setting the :application property to
null
.- Parameters:
application
- the value for theapplication
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setChild
-
setDecorated
Whether the window should have a frame (also known as *decorations*).- Parameters:
decorated
- the value for thedecorated
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setDefaultHeight
The default height of the window.- Parameters:
defaultHeight
- the value for thedefault-height
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setDefaultWidget
-
setDefaultWidth
The default width of the window.- Parameters:
defaultWidth
- the value for thedefault-width
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setDeletable
Whether the window frame should have a close button.- Parameters:
deletable
- the value for thedeletable
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setDestroyWithParent
If this window should be destroyed when the parent is destroyed.- Parameters:
destroyWithParent
- the value for thedestroy-with-parent
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setDisplay
-
setFocusVisible
Whether 'focus rectangles' are currently visible in this window.This property is maintained by GTK based on user input and should not be set by applications.
- Parameters:
focusVisible
- the value for thefocus-visible
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setFocusWidget
-
setFullscreened
Whether the window is fullscreen.Setting this property is the equivalent of calling
Window.fullscreen()
orWindow.unfullscreen()
; either operation is asynchronous, which means you will need to connect to the ::notify signal in order to know whether the operation was successful.- Parameters:
fullscreened
- the value for thefullscreened
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setHandleMenubarAccel
Whether the window frame should handle F10 for activating menubars.- Parameters:
handleMenubarAccel
- the value for thehandle-menubar-accel
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setHideOnClose
If this window should be hidden when the users clicks the close button.- Parameters:
hideOnClose
- the value for thehide-on-close
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setIconName
-
setMaximized
Whether the window is maximized.Setting this property is the equivalent of calling
Window.maximize()
orWindow.unmaximize()
; either operation is asynchronous, which means you will need to connect to the ::notify signal in order to know whether the operation was successful.- Parameters:
maximized
- the value for themaximized
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMnemonicsVisible
Whether mnemonics are currently visible in this window.This property is maintained by GTK based on user input, and should not be set by applications.
- Parameters:
mnemonicsVisible
- the value for themnemonics-visible
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setModal
Iftrue
, the window is modal.- Parameters:
modal
- the value for themodal
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setResizable
Iftrue
, users can resize the window.- Parameters:
resizable
- the value for theresizable
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setStartupId
-
setTitle
-
setTitlebar
-
setTransientFor
-
onActivateDefault
Emitted when the user activates the default widget ofwindow
.This is a keybinding signal.
The keybindings for this signal are all forms of the
Enter
key.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onActivateFocus
Emitted when the user activates the currently focused widget ofwindow
.This is a keybinding signal.
The default binding for this signal is
␣
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onCloseRequest
Emitted when the user clicks on the close button of the window.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onEnableDebugging
Emitted when the user enables or disables interactive debugging.When
toggle
istrue
, interactive debugging is toggled on or off, when it isfalse
, the debugger will be pointed at the widget under the pointer.This is a keybinding signal.
The default bindings for this signal are
Ctrl
+Shift
+I
andCtrl
+Shift
+D
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onKeysChanged
Deprecated.UseShortcut
andEventController
to implement keyboard shortcutsemitted when the set of accelerators or mnemonics that are associated withwindow
changes.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
Shortcut
andEventController
to implement keyboard shortcuts