Packages

  • package root

    ScalaFX is a UI DSL written within the Scala Language that sits on top of JavaFX 2.x and and JavaFX 8.

    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 to javafx.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 a stage that contains a scene. A stage roughly corresponds to a window in a typical UI environment. The scene holds UI content presented to the user. In the example below, the content is a pane with a single label component.

    package hello
    
    import scalafx.application.JFXApp
    import scalafx.application.JFXApp.PrimaryStage
    import scalafx.geometry.Insets
    import scalafx.scene.Scene
    import scalafx.scene.control.Label
    import scalafx.scene.layout.BorderPane
    
    object HelloWorld extends JFXApp {
      stage = new PrimaryStage {
        title = "Hello"
        scene = new Scene {
          root = new BorderPane {
            padding = Insets(25)
            center = new Label("Hello World")
          }
        }
      }
    }
    Definition Classes
    root
  • package scalafx

    Base package for ScalaFX classes.

    Base package for ScalaFX classes.

    Definition Classes
    root
  • package embed
    Definition Classes
    scalafx
  • package swing

    Wraps JavaFX javafx.embed.swing package.

    Definition Classes
    embed
    Since

    8.0

  • SFXPanel
  • SwingFXUtils
  • SwingIncludes
  • SwingNode

package swing

Source
package.scala
Since

8.0

Linear Supertypes
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. swing
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class SFXPanel extends SFXDelegate[JFXPanel]

    Wraps JavaFX JFXPanel.

    Wraps JavaFX JFXPanel. To use methods and properties from JComponent, use its delegate.

    Since

    8.0

  2. trait SwingIncludes extends AnyRef

    Contains implicit methods to convert from embed.swing Classes to their ScalaFX counterparts.

  3. class SwingNode extends Node with SFXDelegate[javafx.embed.swing.SwingNode]

    Wraps JavaFX SwingNode.

    Wraps JavaFX SwingNode. This class is not implementing the impl_* methods from the original class.

    Since

    8.0

Value Members

  1. object SFXPanel

    Companion Object for scalafx.embed.swing.SFXPanel.

  2. object SwingFXUtils

    Wraps JavaFX SwingFXUtils.

    Since

    8.0

  3. object SwingIncludes extends SwingIncludes

    Companion Object for scalafx.embed.swing.SwingIncludes.

  4. object SwingNode

    Companion Object for scalafx.embed.swing.SwingNode.

Inherited from AnyRef

Inherited from Any

Ungrouped