package stage
- Alphabetic
- By Inheritance
- stage
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- class DirectoryChooser extends SFXDelegate[javafx.stage.DirectoryChooser]
-
class
FileChooser
extends SFXDelegate[javafx.stage.FileChooser]
Provides support for standard platform file dialogs.
Provides support for standard platform file dialogs. These dialogs have look and feel of the platform UI components which is independent of JavaFX.
Example:
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); }
-
sealed
case class
Modality
(delegate: javafx.stage.Modality) extends SFXEnumDelegate[javafx.stage.Modality] with Product with Serializable
Wraps javafx.stage.Modality.
- class Popup extends PopupWindow with SFXDelegate[javafx.stage.Popup]
- abstract class PopupWindow extends Window with SFXDelegate[javafx.stage.PopupWindow]
- class Screen extends SFXDelegate[javafx.stage.Screen]
-
class
Stage
extends Window with SFXDelegate[javafx.stage.Stage]
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. -
trait
StageIncludes
extends AnyRef
Contains implcit methods to convert from
javafx.stage
Classes/Traits to their ScalaFX counterparts. -
sealed
case class
StageStyle
(delegate: javafx.stage.StageStyle) extends SFXEnumDelegate[javafx.stage.StageStyle] with Product with Serializable
Wraps http://docs.oracle.com/javase/8/javafx/api/javafx/stage/StageStyle.html
- class Window extends EventHandlerDelegate with SFXDelegate[javafx.stage.Window] with EventTarget
- class WindowEvent extends Event with SFXDelegate[javafx.stage.WindowEvent]
Value Members
- object DirectoryChooser
- object FileChooser
-
object
Modality
extends SFXEnumDelegateCompanion[javafx.stage.Modality, Modality] with Serializable
Wrapper for javafx.stage.Modality
- object Popup
- object PopupWindow
- object Screen
- object Stage
- object StageIncludes extends StageIncludes
- object StageStyle extends SFXEnumDelegateCompanion[javafx.stage.StageStyle, StageStyle] with Serializable
- object Window
- object WindowEvent
ScalaFX is a UI DSL written within the Scala Language that sits on top of JavaFX 2.x and and JavaFX 8. This means that every ScalaFX application is also a valid Scala application. By extension it supports full interoperability with Java and can run anywhere the Java Virtual Machine (JVM) and JavaFX 2.0 or JavaFX 8 are supported.
Package Structure
ScalaFX package structure corresponds to JavaFX package structure, for instance
scalafx.animation
corresponds tojavafx.animation
.Example Usage
A basic ScalaFX application is created creating an object that is an instance of
JFXApp
. Following Java FX theatre metaphor, it contains astage
that contains ascene
. Astage
roughly corresponds to a window in a typical UI environment. Thescene
holds UI content presented to the user. In the example below, the content is a pane with a singlelabel
component.