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
trait Includes
object Includes
object ColorScheme extends SFXEnumDelegateCompanion[ColorScheme, ColorScheme]

Attributes

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

Defines the color scheme of the user interface, which specifies whether applications should prefer light text on dark backgrounds, or dark text on light backgrounds.

Defines the color scheme of the user interface, which specifies whether applications should prefer light text on dark backgrounds, or dark text on light backgrounds.

Wraps javafx.application.ColorScheme

Attributes

Since

JavaFX 22

Companion
object
Supertypes
trait SFXEnumDelegate[ColorScheme]
trait SFXDelegate[ColorScheme]
class Object
trait Matchable
class Any
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
object Effect
object FXML
object Graphics
object InputMethod
object InputPointer
object InputTouch
object Media
object SWT
object Scene3D
object ShapeClip
object Swing
object TwoLevelFocus
object UnifiedWindow
object Web
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 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