Package org.gnome.gtk
Class ListBox.Builder<B extends ListBox.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gobject.InitiallyUnowned.Builder<B>
org.gnome.gtk.Widget.Builder<B>
org.gnome.gtk.ListBox.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
- Enclosing class:
ListBox
public static class ListBox.Builder<B extends ListBox.Builder<B>>
extends Widget.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 theListBox
object.Emitted when the cursor row is activated.onMoveCursor
(ListBox.MoveCursorCallback handler) Emitted when the user initiates a cursor movement.Emitted when a row has been activated by the user.onRowSelected
(ListBox.RowSelectedCallback handler) Emitted when a new row is selected, or (with anull
row
) when the selection is cleared.onSelectAll
(ListBox.SelectAllCallback handler) Emitted to select all children of the box, if the selection mode permits it.Emitted when the set of selected rows changes.Emitted when the cursor row is toggled.onUnselectAll
(ListBox.UnselectAllCallback handler) Emitted to unselect all children of the box, if the selection mode permits it.setAcceptUnpairedRelease
(boolean acceptUnpairedRelease) Whether to accept unpaired release events.setActivateOnSingleClick
(boolean activateOnSingleClick) Determines whether children can be activated with a single click, or require a double-click.setSelectionMode
(SelectionMode selectionMode) The selection mode used by the list box.setShowSeparators
(boolean showSeparators) Whether to show separators between rows.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 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 theListBox
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 toListBox
.- Overrides:
build
in classWidget.Builder<B extends ListBox.Builder<B>>
- Returns:
- a new instance of
ListBox
with the properties that were set in the Builder object.
-
setAcceptUnpairedRelease
Whether to accept unpaired release events.- Parameters:
acceptUnpairedRelease
- the value for theaccept-unpaired-release
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setActivateOnSingleClick
Determines whether children can be activated with a single click, or require a double-click.- Parameters:
activateOnSingleClick
- the value for theactivate-on-single-click
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSelectionMode
The selection mode used by the list box.- Parameters:
selectionMode
- the value for theselection-mode
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setShowSeparators
Whether to show separators between rows.- Parameters:
showSeparators
- the value for theshow-separators
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onActivateCursorRow
Emitted when the cursor row is activated.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onMoveCursor
Emitted when the user initiates a cursor movement.The default bindings for this signal come in two variants, the variant with the Shift modifier extends the selection, the variant without the Shift modifier does not. There are too many key combinations to list them all here.
←
,→
,↑
,↓
move by individual childrenHome
,End
move to the ends of the boxPgUp
,PgDn
move vertically by pages
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onRowActivated
Emitted when a row has been activated by the user.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onRowSelected
Emitted when a new row is selected, or (with anull
row
) when the selection is cleared.When the
box
is usingSelectionMode.MULTIPLE
, this signal will not give you the full picture of selection changes, and you should use theGtk.ListBox::selected-rows-changed
signal instead.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onSelectAll
Emitted to select all children of the box, if the selection mode permits it.This is a keybinding signal.
The default binding for this signal is
Ctrl
-a
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onSelectedRowsChanged
Emitted when the set of selected rows changes.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onToggleCursorRow
Emitted when the cursor row is toggled.The default bindings for this signal is
Ctrl
+␣
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onUnselectAll
Emitted to unselect all children of the box, if the selection mode permits it.This is a keybinding signal.
The default binding for this signal is
Ctrl
-Shift
-a
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-