Class ViewStackPage.Builder<B extends ViewStackPage.Builder<B>>
java.lang.Object
org.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:
Accessible.Builder<B>, BuilderInterface
- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theViewStackPageobject.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.setSectionTitle(String sectionTitle) Section title for this page.setStartsSection(boolean startsSection) Whether this page starts a section.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 GObject.Builder
onNotifyMethods inherited from class Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValuesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Accessible.Builder
setAccessibleRoleMethods inherited from interface BuilderInterface
addBuilderProperty, connect, connect, getArena
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theViewStackPageobject. This will callGObject.withProperties(Type, String[], Value[])to create a new GObject instance, which is then cast toViewStackPage.- Overrides:
buildin classGObject.Builder<B extends ViewStackPage.Builder<B>>- Returns:
- a new instance of
ViewStackPagewith the properties that were set in the Builder object.
-
setBadgeNumber
The badge number for this page.
ViewSwitchercan 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-numberproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setChild
-
setIconName
-
setName
-
setNeedsAttention
Whether the page requires the user attention.
ViewSwitcherwill display it as a dot next to the page icon.- Parameters:
needsAttention- the value for theneeds-attentionproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setSectionTitle
-
setStartsSection
Whether this page starts a section.
If set to
TRUE,ViewStack:pageswill have a section starting from this page.If
ViewStackPage:section-titleis set, it should be used as a title for the section.- Parameters:
startsSection- the value for thestarts-sectionproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.9
-
setTitle
-
setUseUnderline
Whether an embedded underline in the title indicates a mnemonic.- Parameters:
useUnderline- the value for theuse-underlineproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setVisible
Whether this page is visible.
This is independent from the
Gtk.Widget:visibleproperty ofViewStackPage:child.- Parameters:
visible- the value for thevisibleproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-