Package org.gnome.gtk
Class FileDialog.Builder<B extends FileDialog.Builder<B>>
java.lang.Object
org.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 theFileDialogobject.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
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theFileDialogobject. 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:
buildin classGObject.Builder<B extends FileDialog.Builder<B>>- Returns:
- a new instance of
FileDialogwith 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:filtersis used as the default filter. If that property contains no filter, the dialog will be unfiltered.If
Gtk.FileDialog:filtersis 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-filterproperty- Returns:
- the
Builderinstance 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-folderandGtk.FileDialog:initial-name.- Parameters:
initialFile- the value for theinitial-fileproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.10
-
setInitialFolder
-
setInitialName
-
setModal
Whether the file chooser dialog is modal.- Parameters:
modal- the value for themodalproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.10
-
setTitle
-