Class ComboRow.Builder<B extends ComboRow.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
,Actionable.Builder<B>
- Enclosing class:
ComboRow
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theComboRow
object.setEnableSearch
(boolean enableSearch) Whether to show a search entry in the popup.setExpression
(Expression expression) An expression used to obtain strings from items.setFactory
(ListItemFactory factory) Factory for populating list items.setHeaderFactory
(ListItemFactory headerFactory) The factory for creating header widgets for the popup.setListFactory
(ListItemFactory listFactory) The factory for populating list items in the popup.The model that provides the displayed items.setSearchMatchMode
(StringFilterMatchMode searchMatchMode) The match mode for the search filter.setSelected
(int selected) The position of the selected item.setUseSubtitle
(boolean useSubtitle) Whether to use the current value as the subtitle.Methods inherited from class org.gnome.adw.ActionRow.Builder
onActivated, setActivatableWidget, setIconName, setSubtitle, setSubtitleLines, setSubtitleSelectable, setTitleLines
Methods inherited from class org.gnome.adw.PreferencesRow.Builder
setTitle, setTitleSelectable, setUseMarkup, setUseUnderline
Methods inherited from class org.gnome.gtk.ListBoxRow.Builder
onActivate, setActivatable, setChild, setSelectable
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 org.gnome.gtk.Actionable.Builder
setActionName, setActionTarget
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 theComboRow
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 toComboRow
.- Overrides:
build
in classActionRow.Builder<B extends ComboRow.Builder<B>>
- Returns:
- a new instance of
ComboRow
with the properties that were set in the Builder object.
-
setEnableSearch
Whether to show a search entry in the popup.If set to
TRUE
, a search entry will be shown in the popup that allows to search for items in the list.Search requires
ComboRow:expression
to be set.- Parameters:
enableSearch
- the value for theenable-search
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setExpression
An expression used to obtain strings from items.The expression must have a value type of
G_TYPE_STRING
.It's used to bind strings to labels produced by the default factory if
ComboRow:factory
is not set, or whenComboRow:use-subtitle
is set toTRUE
.- Parameters:
expression
- the value for theexpression
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setFactory
Factory for populating list items.This factory is always used for the item in the row. It is also used for items in the popup unless
ComboRow:list-factory
is set.- Parameters:
factory
- the value for thefactory
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setHeaderFactory
The factory for creating header widgets for the popup.- Parameters:
headerFactory
- the value for theheader-factory
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setListFactory
The factory for populating list items in the popup.If this is not set,
ComboRow:factory
is used.- Parameters:
listFactory
- the value for thelist-factory
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setModel
-
setSearchMatchMode
The match mode for the search filter.- Parameters:
searchMatchMode
- the value for thesearch-match-mode
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSelected
The position of the selected item.If no item is selected, the property has the value
Gtk.INVALID_LIST_POSITION
- Parameters:
selected
- the value for theselected
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setUseSubtitle
Whether to use the current value as the subtitle.If you use a custom list item factory, you will need to give the row a name conversion expression with
ComboRow:expression
.If set to
TRUE
, you should not accessActionRow:subtitle
.The subtitle is interpreted as Pango markup if
PreferencesRow:use-markup
is set toTRUE
.- Parameters:
useSubtitle
- the value for theuse-subtitle
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-