Provides support for standard platform file dialogs. These dialogs have look and feel of the platform UI components which is independent of JavaFX.
Example:
import scalafx.Includes._
import scalafx.stage.FileChooser
import scalafx.stage.FileChooser.ExtensionFilter
...
val fileChooser = new FileChooser {
title = "Open Resource File"
extensionFilters ++= Seq(
new ExtensionFilter("Text Files", "*.txt"),
new ExtensionFilter("Image Files", Seq("*.png", "*.jpg", "*.gif")),
new ExtensionFilter("Audio Files", Seq("*.wav", "*.mp3", "*.aac")),
new ExtensionFilter("All Files", "*.*")
)
}
val selectedFile = fileChooser.showOpenDialog(stage)
if (selectedFile != null) {
stage.display(selectedFile);
}
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Gets the extension filters used in the displayed file dialog.
Gets the extension filters used in the displayed file dialog.
Attributes
The initial directory for the displayed dialog.
The initial directory for the displayed dialog.
Attributes
The initial file name for the displayed dialog.
The initial file name for the displayed dialog.
Attributes
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.
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.
Attributes
Shows a new file open dialog.
Shows a new file open dialog.
Attributes
- Returns
-
the selected file or null if no file has been selected
Shows a new file open dialog in which multiple files can be selected.
Shows a new file open dialog in which multiple files can be selected.
Attributes
- Returns
-
the selected files or null if no file has been selected
Shows a new file save dialog.
Shows a new file save dialog.
Attributes
- Returns
-
the selected file or null if no file has been selected
The title of the displayed dialog.
The title of the displayed dialog.
Attributes
Inherited methods
Verifies if a object is equals to this delegate.
Verifies if a object is equals to this delegate.
Value parameters
- ref
-
Object to be compared.
Attributes
- Returns
-
if the other object is equals to this delegate or not.
- Definition Classes
-
SFXDelegate -> Any
- Inherited from:
- SFXDelegate
Attributes
- Returns
-
The delegate hashcode
- Definition Classes
-
SFXDelegate -> Any
- Inherited from:
- SFXDelegate
Attributes
- Returns
-
Returns the original delegate's
toString()
adding a[SFX]
prefix. - Definition Classes
-
SFXDelegate -> Any
- Inherited from:
- SFXDelegate
Concrete fields
JavaFX object to be wrapped.
JavaFX object to be wrapped.