scalafx.stage
Type members
Classlikes
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
The primary stage for your application has to be created by wrapping the JFXApp.STAGE
object.
The primary stage for your application has to be created by wrapping the JFXApp.STAGE
object.
stage = new JFXApp.PrimaryStage { // your definitions }
Any further stage would be simply instantiated by the no-arg constructor.
- Companion
- object
Contains implcit methods to convert from `javafx.stage` Classes/Traits to their ScalaFX counterparts.
Contains implcit methods to convert from `javafx.stage` Classes/Traits to their ScalaFX counterparts.
- Companion
- object