Package org.gnome.gtk
Class FileDialog.Builder<B extends FileDialog.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gtk.FileDialog.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
FileDialog
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theFileDialog
object.setAcceptLabel
(String acceptLabel) Label for the file chooser's accept button.setDefaultFilter
(FileFilter defaultFilter) The default filter.setFilters
(ListModel filters) The list of filters.setInitialFile
(File initialFile) The initial file.setInitialFolder
(File initialFolder) The initial folder.setInitialName
(String initialName) The initial name.setModal
(boolean modal) Whether the file chooser dialog is modal.A title that may be shown on the file chooser dialog.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
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theFileDialog
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 toFileDialog
.- Overrides:
build
in classGObject.Builder<B extends FileDialog.Builder<B>>
- Returns:
- a new instance of
FileDialog
with the properties that were set in the Builder object.
-
setAcceptLabel
-
setDefaultFilter
The default filter.This filter is initially active in the file chooser dialog.
If the default filter is
NULL
, the first filter ofGtk.FileDialog:filters
is used as the default filter. If that property contains no filter, the dialog will be unfiltered.If
Gtk.FileDialog:filters
is notNULL
, the default filter should be part of the list. If it is not, the dialog may choose to not make it available.- Parameters:
defaultFilter
- the value for thedefault-filter
property- Returns:
- the
Builder
instance is returned, to allow method chaining - Since:
- 4.10
-
setFilters
-
setInitialFile
The initial file.This file is initially selected in the file chooser dialog
This is a utility property that sets both
Gtk.FileDialog:initial-folder
andGtk.FileDialog:initial-name
.- Parameters:
initialFile
- the value for theinitial-file
property- Returns:
- the
Builder
instance is returned, to allow method chaining - Since:
- 4.10
-
setInitialFolder
-
setInitialName
-
setModal
Whether the file chooser dialog is modal.- Parameters:
modal
- the value for themodal
property- Returns:
- the
Builder
instance is returned, to allow method chaining - Since:
- 4.10
-
setTitle
-