Class TreeView.Builder<B extends TreeView.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
Accessible.Builder<B>,Scrollable.Builder<B>,BuilderInterface
- Enclosing class:
TreeView
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theTreeViewobject.The number of columns of the treeview has changed.The position of the cursor (focused cell) has changed.onMoveCursor(TreeView.MoveCursorCallback handler) TheGtkTreeView::move-cursor signal is a [keybinding signal]SignalActionwhich gets emitted when the user presses one of the cursor keys.The "row-activated" signal is emitted when the methodTreeView.rowActivated(org.gnome.gtk.TreePath, org.gnome.gtk.TreeViewColumn)is called.The given row has been collapsed (child nodes are hidden).The given row has been expanded (child nodes are shown).onSelectAll(TreeView.SelectAllCallback handler) The given row is about to be collapsed (hide its children nodes).The given row is about to be expanded (show its children nodes).setActivateOnSingleClick(boolean activateOnSingleClick) The activate-on-single-click property specifies whether the "row-activated" signal will be emitted after a single click.setEnableGridLines(TreeViewGridLines enableGridLines) setEnableSearch(boolean enableSearch) setEnableTreeLines(boolean enableTreeLines) setExpanderColumn(TreeViewColumn expanderColumn) setFixedHeightMode(boolean fixedHeightMode) Setting the ::fixed-height-mode property totruespeeds upGtkTreeViewby assuming that all rows have the same height.setHeadersClickable(boolean headersClickable) setHeadersVisible(boolean headersVisible) setHoverExpand(boolean hoverExpand) Enables or disables the hover expansion mode oftreeView.Hover expansion makes rows expand or collapse if the pointer moves over them.setHoverSelection(boolean hoverSelection) Enables or disables the hover selection mode oftreeView.Hover selection makes the selected row follow the pointer.setLevelIndentation(int levelIndentation) Extra indentation for each level.setReorderable(boolean reorderable) setRubberBanding(boolean rubberBanding) setSearchColumn(int searchColumn) setShowExpanders(boolean showExpanders) trueif the view has expanders.setTooltipColumn(int tooltipColumn) 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, 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.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArenaMethods inherited from interface org.gnome.gtk.Scrollable.Builder
setHadjustment, setHscrollPolicy, setVadjustment, setVscrollPolicy
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theTreeViewobject. 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 toTreeView.- Overrides:
buildin classWidget.Builder<B extends TreeView.Builder<B>>- Returns:
- a new instance of
TreeViewwith the properties that were set in the Builder object.
-
setActivateOnSingleClick
The activate-on-single-click property specifies whether the "row-activated" signal will be emitted after a single click.- Parameters:
activateOnSingleClick- the value for theactivate-on-single-clickproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setEnableGridLines
-
setEnableSearch
-
setEnableTreeLines
-
setExpanderColumn
-
setFixedHeightMode
Setting the ::fixed-height-mode property totruespeeds upGtkTreeViewby assuming that all rows have the same height. Only enable this option if all rows are the same height. Please see gtk_tree_view_set_fixed_height_mode() for more information on this option.- Parameters:
fixedHeightMode- the value for thefixed-height-modeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setHeadersClickable
-
setHeadersVisible
-
setHoverExpand
Enables or disables the hover expansion mode oftreeView.Hover expansion makes rows expand or collapse if the pointer moves over them.This mode is primarily intended for treeviews in popups, e.g. in
GtkComboBoxorGtkEntryCompletion.- Parameters:
hoverExpand- the value for thehover-expandproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setHoverSelection
Enables or disables the hover selection mode oftreeView.Hover selection makes the selected row follow the pointer. Currently, this works only for the selection modesSelectionMode.SINGLEandSelectionMode.BROWSE.This mode is primarily intended for treeviews in popups, e.g. in
GtkComboBoxorGtkEntryCompletion.- Parameters:
hoverSelection- the value for thehover-selectionproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setLevelIndentation
Extra indentation for each level.- Parameters:
levelIndentation- the value for thelevel-indentationproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setModel
-
setReorderable
-
setRubberBanding
-
setSearchColumn
-
setShowExpanders
trueif the view has expanders.- Parameters:
showExpanders- the value for theshow-expandersproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setTooltipColumn
-
onColumnsChanged
The number of columns of the treeview has changed.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onCursorChanged
The position of the cursor (focused cell) has changed.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onExpandCollapseCursorRow
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onMoveCursor
TheGtkTreeView::move-cursor signal is a [keybinding signal]SignalActionwhich gets emitted when the user presses one of the cursor keys.Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control the cursor programmatically. In contrast to gtk_tree_view_set_cursor() and gtk_tree_view_set_cursor_on_cell() when moving horizontally
GtkTreeView::move-cursor does not reset the current selection.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onRowActivated
The "row-activated" signal is emitted when the methodTreeView.rowActivated(org.gnome.gtk.TreePath, org.gnome.gtk.TreeViewColumn)is called.This signal is emitted when the user double-clicks a treeview row with the
Gtk.TreeView:activate-on-single-clickproperty set tofalse, or when the user single-clicks a row when that property set totrue.This signal is also emitted when a non-editable row is selected and one of the keys:
Space,Shift+Space,ReturnorEnteris pressed.For selection handling refer to the tree widget conceptual overview as well as
GtkTreeSelection.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onRowCollapsed
The given row has been collapsed (child nodes are hidden).- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onRowExpanded
The given row has been expanded (child nodes are shown).- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onSelectAll
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onSelectCursorParent
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onSelectCursorRow
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onStartInteractiveSearch
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onTestCollapseRow
The given row is about to be collapsed (hide its children nodes). Use this signal if you need to control the collapsibility of individual rows.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onTestExpandRow
The given row is about to be expanded (show its children nodes). Use this signal if you need to control the expandability of individual rows.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onToggleCursorRow
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onUnselectAll
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-