Class SidebarItem.Builder<B extends SidebarItem.Builder<B>>
java.lang.Object
org.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.adw.SidebarItem.Builder<B>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
SidebarItem
public static class SidebarItem.Builder<B extends SidebarItem.Builder<B>>
extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
- Since:
- 1.9
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theSidebarItemobject.setDragMotionActivate(boolean dragMotionActivate) Whether to activate the item on pointer motion during Drag-and-Drop.setEnabled(boolean enabled) Whether the item is enabled.setIconName(String iconName) The icon name for this item.setIconPaintable(Paintable iconPaintable) The paintable to use as the icon for this item.setSubtitle(String subtitle) Subtitle of the item.The suffix widget for this item.Title of the item.setTooltip(String tooltip) The tooltip of the item.setUseUnderline(boolean useUnderline) Whether an underline in the title indicates a mnemonic.setVisible(boolean visible) Whether the item is visible.Methods inherited from class GObject.Builder
onNotifyMethods inherited from class Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theSidebarItemobject. This will callGObject.withProperties(Type, String[], Value[])to create a new GObject instance, which is then cast toSidebarItem.- Overrides:
buildin classGObject.Builder<B extends SidebarItem.Builder<B>>- Returns:
- a new instance of
SidebarItemwith the properties that were set in the Builder object.
-
setDragMotionActivate
Whether to activate the item on pointer motion during Drag-and-Drop.
This is needed to be able to drag content into the page the item represents, when the sidebar is used as a page switcher. However, it may be unwanted when dropping content onto the item itself, so it can be disabled.
- Parameters:
dragMotionActivate- the value for thedrag-motion-activateproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.9
-
setEnabled
Whether the item is enabled.
See
Gtk.Widget:sensitive.- Parameters:
enabled- the value for theenabledproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.9
-
setIconName
-
setIconPaintable
-
setSubtitle
-
setSuffix
The suffix widget for this item.
Suffix will be shown at the end of the item's row, or before the arrow in the
Adw.SidebarMode.pagemode.- Parameters:
suffix- the value for thesuffixproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.9
-
setTitle
-
setTooltip
-
setUseUnderline
Whether an underline in the title indicates a mnemonic.
The mnemonic can be used to activate the item.
- Parameters:
useUnderline- the value for theuse-underlineproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.9
-
setVisible
Whether the item is visible.- Parameters:
visible- the value for thevisibleproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.9
-