- All Known Subinterfaces:
FileOpenPicker,FileSavePicker
- All Known Implementing Classes:
NativeFileOpenPicker,NativeFileSavePicker,WebFileOpenPicker,WebFileSavePicker
- Author:
- Besmir Beqiri
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ObjectProperty<File> Defines the initial directory for the displayed file dialog.javafx.beans.property.StringPropertyThe initial file name for the displayed dialog.javafx.beans.property.ObjectProperty<ExtensionFilter> This property is used to pre-select the extension filter for the next displayed dialog and to read the user-selected extension filter from the dismissed dialog.javafx.beans.property.StringPropertyThe title of the displayed file dialog. -
Method Summary
Modifier and TypeMethodDescriptionjavafx.collections.ObservableList<ExtensionFilter> Gets the extension filters used in the displayed file dialog.The initial directory for the displayed file dialog.The initial file name for the displayed dialog.javafx.scene.NodegetNode()Returns the associated node for this file picker.Gets the extension filter which is currently selected in the displayed file dialog.getTitle()Gets the title of the displayed file dialog.javafx.beans.property.ObjectProperty<File> Defines the initial directory for the displayed file dialog.javafx.beans.property.StringPropertyThe initial file name for the displayed dialog.javafx.beans.property.ObjectProperty<ExtensionFilter> This property is used to pre-select the extension filter for the next displayed dialog and to read the user-selected extension filter from the dismissed dialog.voidsetInitialDirectory(File value) Sets the initial directory for the displayed file dialog.voidsetInitialFileName(String value) Sets the initial file name for the displayed dialog.voidSets the extension filter which is currently selected in the displayed file dialog.voidSets the title of the displayed file dialog.javafx.beans.property.StringPropertyThe title of the displayed file dialog.
-
Property Details
-
title
javafx.beans.property.StringProperty titlePropertyThe title of the displayed file dialog.- See Also:
-
initialFileName
javafx.beans.property.StringProperty initialFileNamePropertyThe initial file name for the displayed dialog.This property is used mostly in the displayed file save dialogs as the initial file name for the file being saved. If set for a file open dialog it will have any impact on the displayed dialog only if the corresponding platform provides support for such property in its file open dialogs.
- See Also:
-
initialDirectory
javafx.beans.property.ObjectProperty<File> initialDirectoryPropertyDefines the initial directory for the displayed file dialog.- See Also:
-
selectedExtensionFilter
javafx.beans.property.ObjectProperty<ExtensionFilter> selectedExtensionFilterPropertyThis property is used to pre-select the extension filter for the next displayed dialog and to read the user-selected extension filter from the dismissed dialog.When the file dialog is shown, the selectedExtensionFilter will be checked. If the value of selectedExtensionFilter is null or is not contained in the list of extension filters, then the first extension filter in the list of extension filters will be selected instead. Otherwise, the specified selectedExtensionFilter will be activated.
After the dialog is dismissed the value of this property is updated to match the user-selected extension filter from the dialog.
- See Also:
-
-
Method Details
-
getNode
javafx.scene.Node getNode()Returns the associated node for this file picker.- Returns:
- the associated node for this file picker.
-
getTitle
String getTitle()Gets the title of the displayed file dialog.- Returns:
- the title string
-
setTitle
Sets the title of the displayed file dialog.- Parameters:
value- the title string
-
titleProperty
javafx.beans.property.StringProperty titleProperty()The title of the displayed file dialog.- Returns:
- the
titleproperty - See Also:
-
getInitialFileName
String getInitialFileName()The initial file name for the displayed dialog.- Returns:
- the file name as a string
-
setInitialFileName
Sets the initial file name for the displayed dialog.- Parameters:
value- the file name
-
initialFileNameProperty
javafx.beans.property.StringProperty initialFileNameProperty()The initial file name for the displayed dialog.This property is used mostly in the displayed file save dialogs as the initial file name for the file being saved. If set for a file open dialog it will have any impact on the displayed dialog only if the corresponding platform provides support for such property in its file open dialogs.
- Returns:
- the
initialFileNameproperty - See Also:
-
getInitialDirectory
File getInitialDirectory()The initial directory for the displayed file dialog.- Returns:
- the initial directory as a
Fileobject
-
setInitialDirectory
Sets the initial directory for the displayed file dialog.- Parameters:
value- the initial directory as aFileobject
-
initialDirectoryProperty
javafx.beans.property.ObjectProperty<File> initialDirectoryProperty()Defines the initial directory for the displayed file dialog.- Returns:
- the
initialDirectoryproperty - See Also:
-
getExtensionFilters
javafx.collections.ObservableList<ExtensionFilter> getExtensionFilters()Gets the extension filters used in the displayed file dialog. Only one extension filter from the list is active at any time in the displayed dialog and only files which correspond to this extension filter are shown. The first extension filter from the list is activated when the dialog is invoked. Then the user can switch the active extension filter to any other extension filter from the list and in this way control the set of displayed files.- Returns:
- An observable list of the extension filters used in the dialog
-
getSelectedExtensionFilter
ExtensionFilter getSelectedExtensionFilter()Gets the extension filter which is currently selected in the displayed file dialog.- Returns:
- the selected extension filter or
nullif no extension
-
setSelectedExtensionFilter
Sets the extension filter which is currently selected in the displayed file dialog.- Parameters:
value- the selected extension filter
-
selectedExtensionFilterProperty
javafx.beans.property.ObjectProperty<ExtensionFilter> selectedExtensionFilterProperty()This property is used to pre-select the extension filter for the next displayed dialog and to read the user-selected extension filter from the dismissed dialog.When the file dialog is shown, the selectedExtensionFilter will be checked. If the value of selectedExtensionFilter is null or is not contained in the list of extension filters, then the first extension filter in the list of extension filters will be selected instead. Otherwise, the specified selectedExtensionFilter will be activated.
After the dialog is dismissed the value of this property is updated to match the user-selected extension filter from the dialog.
- Returns:
- the
selectedExtensionFilterproperty - See Also:
-