scalafx.application

Wraps `javafx.application` package.

Attributes

Members list

Type members

Classlikes

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Contains implicit methods to convert from `javafx.application` Classes to their ScalaFX counterparts.

Contains implicit methods to convert from `javafx.application` Classes to their ScalaFX counterparts.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ApplicationIncludes.type
trait Includes
object Includes.type
object ConditionalFeature extends SFXEnumDelegateCompanion[ConditionalFeature, ConditionalFeature]

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
trait SFXEnumDelegateCompanion[ConditionalFeature, ConditionalFeature]
class Object
trait Matchable
class Any
Show all
Self type
sealed abstract class ConditionalFeature(val delegate: ConditionalFeature) extends SFXEnumDelegate[ConditionalFeature]

Attributes

Companion
object
Supertypes
trait SFXEnumDelegate[ConditionalFeature]
trait SFXDelegate[ConditionalFeature]
class Object
trait Matchable
class Any
Known subtypes
object Controls.type
object Effect.type
object FXML.type
object Graphics.type
object InputMethod.type
object InputMultitouch.type
object InputPointer.type
object InputTouch.type
object Media.type
object SWT.type
object Scene3D.type
object ShapeClip.type
object Swing.type
object TransparentWindow.type
object TwoLevelFocus.type
object UnifiedWindow.type
object VirtualKeyboard.type
object Web.type
Show all
object HostServices

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class HostServices(val delegate: HostServices) extends SFXDelegate[HostServices]

This class provides HostServices for an Application. This includes methods to get the code base and document base for an Application, show a web page in a browser, and communicate with the enclosing web page using JavaScript if the Application is running in a browser.

This class provides HostServices for an Application. This includes methods to get the code base and document base for an Application, show a web page in a browser, and communicate with the enclosing web page using JavaScript if the Application is running in a browser.

Wraps a $JFX $URL0 $TC]].

Attributes

Companion
object
Supertypes
trait SFXDelegate[HostServices]
class Object
trait Matchable
class Any
object JFXApp

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
JFXApp.type
object JFXApp3

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
JFXApp3.type
trait JFXApp3

ScalaFX applications can extend JFXApp3 to create properly initialized JavaFX applications.

ScalaFX applications can extend JFXApp3 to create properly initialized JavaFX applications.

On the back end JFXApp3 first calls javafx.application.Application.launch then executes body of its constructor when javafx.application.Application.start(primaryStage:Stage) is called. Here is an example use:

 import scalafx.application.JFXApp3
 import scalafx.application.JFXApp3.PrimaryStage
 import scalafx.geometry.Insets
 import scalafx.scene.Scene
 import scalafx.scene.layout.HBox
 import scalafx.scene.paint.Color._
 import scalafx.scene.paint._
 import scalafx.scene.text.Text

 object JFXApp3Demo extends JFXApp3 {
   override def start(): Unit = {
     stage = new PrimaryStage {
       title = "ScalaFX Hello World!"
       scene = new Scene {
         fill = Color.rgb(38, 38, 38)
         content = new HBox {
           padding = Insets(50, 80, 50, 80)
           children = Seq(
             new Text {
               text = "Hello World!"
               style = "-fx-font: normal bold 100pt sans-serif"
               fill = new LinearGradient(endX = 0, stops = Stops(Red, DarkRed))
             }
           )
         }
       }
     }
   }
 }

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Platform

Application platform support, wrapper for javafx.application.Platform.

Application platform support, wrapper for javafx.application.Platform.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Platform.type

Deprecated classlikes

trait JFXApp extends DelayedInit

ScalaFX applications can extend JFXApp to create properly initialized JavaFX applications.

ScalaFX applications can extend JFXApp to create properly initialized JavaFX applications.

On the back end JFXApp first calls javafx.application.Application.launch then executes body of its constructor when javafx.application.Application.start(primaryStage:Stage) is called. Here is an example use:

 object SimpleScalaFXApp extends JFXApp {
    stage = new PrimaryStage {
      title = "Simple ScalaFX App"
      scene = new Scene {
        root = new StackPane {
          padding = Insets(20)
          content = new Rectangle {
            width = 200
            height = 200
            fill = Color.DEEPSKYBLUE
          }
        }
      }
    }
 }

Attributes

Companion
object
Deprecated
[Since version 16.0.0-R23]

JFXApp depends on DelayedInit that is deprecated since Scala 2.11.0 and no longer works in Scala 3. Use JFXApp3 instead.

Supertypes
trait DelayedInit
class Object
trait Matchable
class Any