Package org.gnome.gtk
Class Notebook.Builder<B extends Notebook.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gobject.InitiallyUnowned.Builder<B>
org.gnome.gtk.Widget.Builder<B>
org.gnome.gtk.Notebook.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
- Enclosing class:
Notebook
public static class Notebook.Builder<B extends Notebook.Builder<B>>
extends Widget.Builder<B>
implements Accessible.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theNotebook
object.Emitted when the current page should be changed.The ::create-window signal is emitted when a detachable tab is dropped on the root window.onFocusTab
(Notebook.FocusTabCallback handler) Emitted when a tab should be focused.Emitted when focus was moved out.onPageAdded
(Notebook.PageAddedCallback handler) the ::page-added signal is emitted in the notebook right after a page is added to the notebook.the ::page-removed signal is emitted in the notebook right after a page is removed from the notebook.the ::page-reordered signal is emitted in the notebook right after a page has been reordered.onReorderTab
(Notebook.ReorderTabCallback handler) Emitted when the tab should be reordered.onSelectPage
(Notebook.SelectPageCallback handler) Emitted when a page should be selected.onSwitchPage
(Notebook.SwitchPageCallback handler) Emitted when the user or a function changes the current page.setEnablePopup
(boolean enablePopup) Iftrue
, pressing the right mouse button on the notebook shows a page switching menu.setGroupName
(String groupName) Group name for tab drag and drop.setPage
(int page) The index of the current page.setScrollable
(boolean scrollable) Iftrue
, scroll arrows are added if there are too many pages to fit.setShowBorder
(boolean showBorder) Whether the border should be shown.setShowTabs
(boolean showTabs) Whether tabs should be shown.setTabPos
(PositionType tabPos) Which side of the notebook holds the tabs.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 theNotebook
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 toNotebook
.- Overrides:
build
in classWidget.Builder<B extends Notebook.Builder<B>>
- Returns:
- a new instance of
Notebook
with the properties that were set in the Builder object.
-
setEnablePopup
Iftrue
, pressing the right mouse button on the notebook shows a page switching menu.- Parameters:
enablePopup
- the value for theenable-popup
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setGroupName
-
setPage
The index of the current page.- Parameters:
page
- the value for thepage
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setScrollable
Iftrue
, scroll arrows are added if there are too many pages to fit.- Parameters:
scrollable
- the value for thescrollable
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setShowBorder
Whether the border should be shown.- Parameters:
showBorder
- the value for theshow-border
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setShowTabs
Whether tabs should be shown.- Parameters:
showTabs
- the value for theshow-tabs
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTabPos
Which side of the notebook holds the tabs.- Parameters:
tabPos
- the value for thetab-pos
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onChangeCurrentPage
Emitted when the current page should be changed.The default bindings for this signal are
Ctrl
+Alt
+PgUp
,Ctrl
+Alt
+PgDn
,Ctrl
+PgUp
andCtrl
+PgDn
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onCreateWindow
The ::create-window signal is emitted when a detachable tab is dropped on the root window.A handler for this signal can create a window containing a notebook where the tab will be attached. It is also responsible for moving/resizing the window and adding the necessary properties to the notebook (e.g. the
GtkNotebook
:group-name ).- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onFocusTab
Emitted when a tab should be focused.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onMoveFocusOut
Emitted when focus was moved out.The default bindings for this signal are
Ctrl
+Tab
,Ctrl
+Shift
+Tab
,Ctrl
+←
,Ctrl
+→
,Ctrl
+↑
andCtrl
+↓
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onPageAdded
the ::page-added signal is emitted in the notebook right after a page is added to the notebook.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onPageRemoved
the ::page-removed signal is emitted in the notebook right after a page is removed from the notebook.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onPageReordered
the ::page-reordered signal is emitted in the notebook right after a page has been reordered.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onReorderTab
Emitted when the tab should be reordered.The default bindings for this signal are
Alt
+Home
,Alt
+End
,Alt
+PgUp
,Alt
+PgDn
,Alt
+←
,Alt
+→
,Alt
+↑
andAlt
+↓
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onSelectPage
Emitted when a page should be selected.The default binding for this signal is
␣
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onSwitchPage
Emitted when the user or a function changes the current page.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-