Class FileChooserWidget.Builder<B extends FileChooserWidget.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, FileChooser.Builder<B>, BuilderInterface
Enclosing class:
FileChooserWidget

public static class FileChooserWidget.Builder<B extends FileChooserWidget.Builder<B>> extends Widget.Builder<B> implements Accessible.Builder<B>, FileChooser.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 FileChooserWidget build()
      Finish building the FileChooserWidget object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to FileChooserWidget.
      Overrides:
      build in class Widget.Builder<B extends FileChooserWidget.Builder<B>>
      Returns:
      a new instance of FileChooserWidget with the properties that were set in the Builder object.
    • setSearchMode

      public B setSearchMode(boolean searchMode)
      Whether search mode is enabled.
      Parameters:
      searchMode - the value for the search-mode property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onDesktopFolder

      public B onDesktopFolder(FileChooserWidget.DesktopFolderCallback handler)

      Emitted when the user asks for it.

      This is a keybinding signal.

      This is used to make the file chooser show the user's Desktop folder in the file list.

      The default binding for this signal is Alt-D.

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

      public B onDownFolder(FileChooserWidget.DownFolderCallback handler)

      Emitted when the user asks for it.

      This is a keybinding signal.

      This is used to make the file chooser go to a child of the current folder in the file hierarchy. The subfolder that will be used is displayed in the path bar widget of the file chooser. For example, if the path bar is showing "/foo/bar/baz", with bar currently displayed, then this will cause the file chooser to switch to the "baz" subfolder.

      The default binding for this signal is Alt-Down.

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

      public B onHomeFolder(FileChooserWidget.HomeFolderCallback handler)

      Emitted when the user asks for it.

      This is a keybinding signal.

      This is used to make the file chooser show the user's home folder in the file list.

      The default binding for this signal is Alt-Home.

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

      public B onLocationPopup(FileChooserWidget.LocationPopupCallback handler)

      Emitted when the user asks for it.

      This is a keybinding signal.

      This is used to make the file chooser show a "Location" prompt which the user can use to manually type the name of the file he wishes to select.

      The default bindings for this signal are Control-L with a path string of "" (the empty string). It is also bound to / with a path string of "/" (a slash): this lets you type / and immediately type a path name. On Unix systems, this is bound to ~ (tilde) with a path string of "~" itself for access to home directories.

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

      public B onLocationPopupOnPaste(FileChooserWidget.LocationPopupOnPasteCallback handler)

      Emitted when the user asks for it.

      This is a keybinding signal.

      This is used to make the file chooser show a "Location" prompt when the user pastes into a GtkFileChooserWidget.

      The default binding for this signal is Control-V.

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

      public B onLocationTogglePopup(FileChooserWidget.LocationTogglePopupCallback handler)

      Emitted when the user asks for it.

      This is a keybinding signal.

      This is used to toggle the visibility of a "Location" prompt which the user can use to manually type the name of the file he wishes to select.

      The default binding for this signal is Control-L.

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

      public B onPlacesShortcut(FileChooserWidget.PlacesShortcutCallback handler)

      Emitted when the user asks for it.

      This is a keybinding signal.

      This is used to move the focus to the places sidebar.

      The default binding for this signal is Alt-P.

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

      public B onQuickBookmark(FileChooserWidget.QuickBookmarkCallback handler)

      Emitted when the user asks for it.

      This is a keybinding signal.

      This is used to make the file chooser switch to the bookmark specified in the bookmarkIndex parameter. For example, if you have three bookmarks, you can pass 0, 1, 2 to this signal to switch to each of them, respectively.

      The default binding for this signal is Alt-1, Alt-2, etc. until Alt-0. Note that in the default binding, that Alt-1 is actually defined to switch to the bookmark at index 0, and so on successively.

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

      public B onRecentShortcut(FileChooserWidget.RecentShortcutCallback handler)

      Emitted when the user asks for it.

      This is a keybinding signal.

      This is used to make the file chooser show the Recent location.

      The default binding for this signal is Alt-R.

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

      public B onSearchShortcut(FileChooserWidget.SearchShortcutCallback handler)

      Emitted when the user asks for it.

      This is a keybinding signal.

      This is used to make the file chooser show the search entry.

      The default binding for this signal is Alt-S.

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

      public B onShowHidden(FileChooserWidget.ShowHiddenCallback handler)

      Emitted when the user asks for it.

      This is a keybinding signal.

      This is used to make the file chooser display hidden files.

      The default binding for this signal is Control-H.

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

      public B onUpFolder(FileChooserWidget.UpFolderCallback handler)

      Emitted when the user asks for it.

      This is a keybinding signal.

      This is used to make the file chooser go to the parent of the current folder in the file hierarchy.

      The default binding for this signal is Alt-Up.

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