Class Window.Builder<B extends Window.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
Accessible.Builder<B>,BuilderInterface
- Direct Known Subclasses:
AboutDialog.Builder,ApplicationWindow.Builder,Assistant.Builder,Dialog.Builder,MessageDialog.Builder,ShortcutsWindow.Builder,Window.Builder
- Enclosing class:
Window
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theWindowobject.Emitted when the user activates the default widget.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) TheGtkApplicationassociated 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.setGravity(WindowGravity gravity) The gravity to use when resizing the window programmatically.setHandleMenubarAccel(boolean handleMenubarAccel) Whether the window frame should handleF10for activating menubars.setHideOnClose(boolean hideOnClose) If this window should be hidden instead of destroyed when the user 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) If true, the window is modal.setResizable(boolean resizable) If true, 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, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setReceivesDefault, setSensitive, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setWidthRequestMethods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gnome.gtk.Accessible.Builder
setAccessibleRoleMethods inherited from interface org.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theWindowobject. 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:
buildin classWidget.Builder<B extends Window.Builder<B>>- Returns:
- a new instance of
Windowwith the properties that were set in the Builder object.
-
setApplication
TheGtkApplicationassociated 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 this property to
NULL.- Parameters:
application- the value for theapplicationproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setChild
-
setDecorated
Whether the window should have a frame (also known as *decorations*).- Parameters:
decorated- the value for thedecoratedproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setDefaultHeight
The default height of the window.- Parameters:
defaultHeight- the value for thedefault-heightproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setDefaultWidget
-
setDefaultWidth
The default width of the window.- Parameters:
defaultWidth- the value for thedefault-widthproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setDeletable
Whether the window frame should have a close button.- Parameters:
deletable- the value for thedeletableproperty- Returns:
- the
Builderinstance 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-parentproperty- Returns:
- the
Builderinstance 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-visibleproperty- Returns:
- the
Builderinstance 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 thefullscreenedproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setGravity
The gravity to use when resizing the window programmatically.Gravity describes which point of the window we want to keep fixed (meaning that the window will grow in the opposite direction). For example, a gravity of
GTK_WINDOW_GRAVITY_TOP_RIGHTmeans that we want the to fix top right corner of the window.- Parameters:
gravity- the value for thegravityproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.20
-
setHandleMenubarAccel
Whether the window frame should handleF10for activating menubars.- Parameters:
handleMenubarAccel- the value for thehandle-menubar-accelproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.2
-
setHideOnClose
If this window should be hidden instead of destroyed when the user clicks the close button.- Parameters:
hideOnClose- the value for thehide-on-closeproperty- Returns:
- the
Builderinstance 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 themaximizedproperty- Returns:
- the
Builderinstance 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-visibleproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setModal
If true, the window is modal.- Parameters:
modal- the value for themodalproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setResizable
If true, users can resize the window.- Parameters:
resizable- the value for theresizableproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setStartupId
-
setTitle
-
setTitlebar
-
setTransientFor
-
onActivateDefault
Emitted when the user activates the default widget.This is a keybinding signal.
The keybindings for this signal are all forms of the
Enterkey.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance 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
Builderinstance 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
Builderinstance is returned, to allow method chaining - See Also:
-
onEnableDebugging
Emitted when the user enables or disables interactive debugging.When
toggleis true, interactive debugging is toggled on or off, when it is false, 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+IandCtrl+Shift+D.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onKeysChanged
Deprecated.UseShortcutandEventControllerto implement keyboard shortcutsEmitted when the set of accelerators or mnemonics that are associated with the window changes.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
ShortcutandEventControllerto implement keyboard shortcuts