Provides support for standard platform file dialogs. These dialogs have look and feel of the platform UI components which is independent of JavaFX.
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);
}
- Companion
- object
Value members
Concrete methods
Gets the extension filters used in the displayed file dialog.
Gets the extension filters used in the displayed file 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.
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.
Shows a new file open dialog.
Shows a new file open dialog.
- 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.
- Returns
the selected files or null if no file has been selected
Inherited methods
Verifies if a object is equals to this delegate.
Verifies if a object is equals to this delegate.
- Value Params
- ref
Object to be compared.
- Returns
if the other object is equals to this delegate or not.
- Definition Classes
- SFXDelegate -> Any
- Inherited from
- SFXDelegate
- Returns
Returns the original delegate's
toString()
adding a[SFX]
prefix.- Definition Classes
- SFXDelegate -> Any
- Inherited from
- SFXDelegate