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
-
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, that is, the filter that is initially active in the file chooser dialog.setFilters
(ListModel filters) The list of filters.setInitialFile
(File initialFile) The initial file, that is, the file that is initially selected in the file chooser dialogsetInitialFolder
(File initialFolder) The initial folder, that is, the directory that is initially opened in the file chooser dialogsetInitialName
(String initialName) The initial name, that is, the filename that is initially selected in the file chooser dialog.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, that is, the filter that 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
-
setFilters
-
setInitialFile
The initial file, that is, the file that is initially selected in the file chooser dialogThis 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
-
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
-
setTitle
-