Class IconView.Builder<B extends IconView.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:
IconView

public static class IconView.Builder<B extends IconView.Builder<B>> extends Widget.Builder<B> implements Accessible.Builder<B>, Scrollable.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public IconView build()
      Finish building the IconView object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to IconView.
      Overrides:
      build in class Widget.Builder<B extends IconView.Builder<B>>
      Returns:
      a new instance of IconView with the properties that were set in the Builder object.
    • setActivateOnSingleClick

      public B setActivateOnSingleClick(boolean activateOnSingleClick)
      The activate-on-single-click property specifies whether the "item-activated" signal will be emitted after a single click.
      Parameters:
      activateOnSingleClick - the value for the activate-on-single-click property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setCellArea

      public B setCellArea(CellArea cellArea)

      The GtkCellArea used to layout cell renderers for this view.

      If no area is specified when creating the icon view with gtk_icon_view_new_with_area() a GtkCellAreaBox will be used.

      Parameters:
      cellArea - the value for the cell-area property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setColumnSpacing

      public B setColumnSpacing(int columnSpacing)
      The column-spacing property specifies the space which is inserted between the columns of the icon view.
      Parameters:
      columnSpacing - the value for the column-spacing property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setColumns

      public B setColumns(int columns)
      The columns property contains the number of the columns in which the items should be displayed. If it is -1, the number of columns will be chosen automatically to fill the available area.
      Parameters:
      columns - the value for the columns property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setItemOrientation

      public B setItemOrientation(Orientation itemOrientation)
      The item-orientation property specifies how the cells (i.e. the icon and the text) of the item are positioned relative to each other.
      Parameters:
      itemOrientation - the value for the item-orientation property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setItemPadding

      public B setItemPadding(int itemPadding)
      The item-padding property specifies the padding around each of the icon view's item.
      Parameters:
      itemPadding - the value for the item-padding property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setItemWidth

      public B setItemWidth(int itemWidth)
      The item-width property specifies the width to use for each item. If it is set to -1, the icon view will automatically determine a suitable item size.
      Parameters:
      itemWidth - the value for the item-width property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setMargin

      public B setMargin(int margin)
      The margin property specifies the space which is inserted at the edges of the icon view.
      Parameters:
      margin - the value for the margin property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setMarkupColumn

      public B setMarkupColumn(int markupColumn)
      The ::markup-column property contains the number of the model column containing markup information to be displayed. The markup column must be of type G_TYPE_STRING. If this property and the :text-column property are both set to column numbers, it overrides the text column. If both are set to -1, no texts are displayed.
      Parameters:
      markupColumn - the value for the markup-column property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setModel

      public B setModel(TreeModel model)
      The model of the icon view.
      Parameters:
      model - the value for the model property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setPixbufColumn

      public B setPixbufColumn(int pixbufColumn)
      The ::pixbuf-column property contains the number of the model column containing the pixbufs which are displayed. The pixbuf column must be of type GDK_TYPE_PIXBUF. Setting this property to -1 turns off the display of pixbufs.
      Parameters:
      pixbufColumn - the value for the pixbuf-column property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setReorderable

      public B setReorderable(boolean reorderable)
      The reorderable property specifies if the items can be reordered by DND.
      Parameters:
      reorderable - the value for the reorderable property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setRowSpacing

      public B setRowSpacing(int rowSpacing)
      The row-spacing property specifies the space which is inserted between the rows of the icon view.
      Parameters:
      rowSpacing - the value for the row-spacing property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSelectionMode

      public B setSelectionMode(SelectionMode selectionMode)
      The ::selection-mode property specifies the selection mode of icon view. If the mode is SelectionMode.MULTIPLE, rubberband selection is enabled, for the other modes, only keyboard selection is possible.
      Parameters:
      selectionMode - the value for the selection-mode property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSpacing

      public B setSpacing(int spacing)
      The spacing property specifies the space which is inserted between the cells (i.e. the icon and the text) of an item.
      Parameters:
      spacing - the value for the spacing property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTextColumn

      public B setTextColumn(int textColumn)
      The ::text-column property contains the number of the model column containing the texts which are displayed. The text column must be of type G_TYPE_STRING. If this property and the :markup-column property are both set to -1, no texts are displayed.
      Parameters:
      textColumn - the value for the text-column property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTooltipColumn

      public B setTooltipColumn(int tooltipColumn)
      The column of the icon view model which is being used for displaying tooltips on it's rows.
      Parameters:
      tooltipColumn - the value for the tooltip-column property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onActivateCursorItem

      public B onActivateCursorItem(IconView.ActivateCursorItemCallback handler)

      A Gtk.SignalAction which gets emitted when the user activates the currently focused item.

      Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control activation programmatically.

      The default bindings for this signal are Space, Return and Enter.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onItemActivated

      public B onItemActivated(IconView.ItemActivatedCallback handler)
      The ::item-activated signal is emitted when the method gtk_icon_view_item_activated() is called, when the user double clicks an item with the "activate-on-single-click" property set to false, or when the user single clicks an item when the "activate-on-single-click" property set to true. It is also emitted when a non-editable item is selected and one of the keys: Space, Return or Enter is pressed.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onMoveCursor

      public B onMoveCursor(IconView.MoveCursorCallback handler)

      The ::move-cursor signal is a Gtk.SignalAction which gets emitted when the user initiates a cursor movement.

      Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control the cursor programmatically.

      The default bindings for this signal include

      • Arrow keys which move by individual steps
      • Home/End keys which move to the first/last item
      • PageUp/PageDown which move by "pages" All of these will extend the selection when combined with the Shift modifier.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onSelectAll

      public B onSelectAll(IconView.SelectAllCallback handler)

      A Gtk.SignalAction which gets emitted when the user selects all items.

      Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control selection programmatically.

      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:
    • onSelectCursorItem

      public B onSelectCursorItem(IconView.SelectCursorItemCallback handler)

      A Gtk.SignalAction which gets emitted when the user selects the item that is currently focused.

      Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control selection programmatically.

      There is no default binding for this signal.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onSelectionChanged

      public B onSelectionChanged(IconView.SelectionChangedCallback handler)
      The ::selection-changed signal is emitted when the selection (i.e. the set of selected items) changes.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onToggleCursorItem

      public B onToggleCursorItem(IconView.ToggleCursorItemCallback handler)

      A Gtk.SignalAction which gets emitted when the user toggles whether the currently focused item is selected or not. The exact effect of this depend on the selection mode.

      Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control selection programmatically.

      There is no default binding for this signal is Ctrl-Space.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onUnselectAll

      public B onUnselectAll(IconView.UnselectAllCallback handler)

      A Gtk.SignalAction which gets emitted when the user unselects all items.

      Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control selection programmatically.

      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: