Package org.gnome.adw
Class ViewStackPage.Builder<B extends ViewStackPage.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.adw.ViewStackPage.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
- Enclosing class:
ViewStackPage
public static class ViewStackPage.Builder<B extends ViewStackPage.Builder<B>>
extends GObject.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 theViewStackPage
object.setBadgeNumber
(int badgeNumber) The badge number for this page.The stack child to which the page belongs.setIconName
(String iconName) The icon name of the child page.The name of the child page.setNeedsAttention
(boolean needsAttention) Whether the page requires the user attention.The title of the child page.setUseUnderline
(boolean useUnderline) Whether an embedded underline in the title indicates a mnemonic.setVisible
(boolean visible) Whether this page is visible.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 theViewStackPage
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 toViewStackPage
.- Overrides:
build
in classGObject.Builder<B extends ViewStackPage.Builder<B>>
- Returns:
- a new instance of
ViewStackPage
with the properties that were set in the Builder object.
-
setBadgeNumber
The badge number for this page.ViewSwitcher
can display it as a badge next to the page icon. It is commonly used to display a number of unread items within the page.It can be used together with
ViewStack{age}:needs-attention
.- Parameters:
badgeNumber
- the value for thebadge-number
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setChild
-
setIconName
-
setName
-
setNeedsAttention
Whether the page requires the user attention.ViewSwitcher
will display it as a dot next to the page icon.- Parameters:
needsAttention
- the value for theneeds-attention
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTitle
-
setUseUnderline
Whether an embedded underline in the title indicates a mnemonic.- Parameters:
useUnderline
- the value for theuse-underline
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setVisible
Whether this page is visible.This is independent from the
Gtk.Widget:visible
property ofViewStackPage:child
.- Parameters:
visible
- the value for thevisible
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-