Class ComboRow.Builder<B extends ComboRow.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
Accessible.Builder<B>,Actionable.Builder<B>,BuilderInterface
- Enclosing class:
ComboRow
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theComboRowobject.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, setTitleLinesMethods inherited from class org.gnome.adw.PreferencesRow.Builder
setTitle, setTitleSelectable, setUseMarkup, setUseUnderlineMethods inherited from class org.gnome.gtk.ListBoxRow.Builder
onActivate, setActivatable, setChild, setSelectableMethods 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, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setReceivesDefault, setSensitive, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setWidthRequestMethods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gnome.gtk.Accessible.Builder
setAccessibleRoleMethods inherited from interface org.gnome.gtk.Actionable.Builder
setActionName, setActionTargetMethods inherited from interface org.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theComboRowobject. 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:
buildin classActionRow.Builder<B extends ComboRow.Builder<B>>- Returns:
- a new instance of
ComboRowwith 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:expressionto be set.- Parameters:
enableSearch- the value for theenable-searchproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
-
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:factoryis not set, or whenComboRow:use-subtitleis set toTRUE.- Parameters:
expression- the value for theexpressionproperty- Returns:
- the
Builderinstance 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-factoryis set.- Parameters:
factory- the value for thefactoryproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setHeaderFactory
The factory for creating header widgets for the popup.- Parameters:
headerFactory- the value for theheader-factoryproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.6
-
setListFactory
The factory for populating list items in the popup.If this is not set,
ComboRow:factoryis used.- Parameters:
listFactory- the value for thelist-factoryproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setModel
-
setSearchMatchMode
The match mode for the search filter.- Parameters:
searchMatchMode- the value for thesearch-match-modeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.6
-
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 theselectedproperty- Returns:
- the
Builderinstance 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-markupis set toTRUE.- Parameters:
useSubtitle- the value for theuse-subtitleproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-