1*7a7160feSAndroid Build Coastguard Worker// This file was automatically generated from ${file.name} by Knit tool. Do not edit. 2*7a7160feSAndroid Build Coastguard Workerpackage ${knit.package}.${knit.name} 3*7a7160feSAndroid Build Coastguard Worker 4*7a7160feSAndroid Build Coastguard Workerimport kotlinx.coroutines.* 5*7a7160feSAndroid Build Coastguard Workerimport kotlinx.coroutines.channels.* 6*7a7160feSAndroid Build Coastguard Workerimport kotlinx.coroutines.javafx.JavaFx as Main 7*7a7160feSAndroid Build Coastguard Workerimport javafx.application.Application 8*7a7160feSAndroid Build Coastguard Workerimport javafx.event.EventHandler 9*7a7160feSAndroid Build Coastguard Workerimport javafx.geometry.* 10*7a7160feSAndroid Build Coastguard Workerimport javafx.scene.* 11*7a7160feSAndroid Build Coastguard Workerimport javafx.scene.input.MouseEvent 12*7a7160feSAndroid Build Coastguard Workerimport javafx.scene.layout.StackPane 13*7a7160feSAndroid Build Coastguard Workerimport javafx.scene.paint.Color 14*7a7160feSAndroid Build Coastguard Workerimport javafx.scene.shape.Circle 15*7a7160feSAndroid Build Coastguard Workerimport javafx.scene.text.Text 16*7a7160feSAndroid Build Coastguard Workerimport javafx.stage.Stage 17*7a7160feSAndroid Build Coastguard Worker 18*7a7160feSAndroid Build Coastguard Workerfun main(args: Array<String>) { 19*7a7160feSAndroid Build Coastguard Worker Application.launch(ExampleApp::class.java, *args) 20*7a7160feSAndroid Build Coastguard Worker} 21*7a7160feSAndroid Build Coastguard Worker 22*7a7160feSAndroid Build Coastguard Workerclass ExampleApp : Application() { 23*7a7160feSAndroid Build Coastguard Worker val hello = Text("Hello World!").apply { 24*7a7160feSAndroid Build Coastguard Worker fill = Color.valueOf("#C0C0C0") 25*7a7160feSAndroid Build Coastguard Worker } 26*7a7160feSAndroid Build Coastguard Worker 27*7a7160feSAndroid Build Coastguard Worker val fab = Circle(20.0, Color.valueOf("#FF4081")) 28*7a7160feSAndroid Build Coastguard Worker 29*7a7160feSAndroid Build Coastguard Worker val root = StackPane().apply { 30*7a7160feSAndroid Build Coastguard Worker children += hello 31*7a7160feSAndroid Build Coastguard Worker children += fab 32*7a7160feSAndroid Build Coastguard Worker StackPane.setAlignment(hello, Pos.CENTER) 33*7a7160feSAndroid Build Coastguard Worker StackPane.setAlignment(fab, Pos.BOTTOM_RIGHT) 34*7a7160feSAndroid Build Coastguard Worker StackPane.setMargin(fab, Insets(15.0)) 35*7a7160feSAndroid Build Coastguard Worker } 36*7a7160feSAndroid Build Coastguard Worker 37*7a7160feSAndroid Build Coastguard Worker val scene = Scene(root, 240.0, 380.0).apply { 38*7a7160feSAndroid Build Coastguard Worker fill = Color.valueOf("#303030") 39*7a7160feSAndroid Build Coastguard Worker } 40*7a7160feSAndroid Build Coastguard Worker 41*7a7160feSAndroid Build Coastguard Worker override fun start(stage: Stage) { 42*7a7160feSAndroid Build Coastguard Worker stage.title = "Example" 43*7a7160feSAndroid Build Coastguard Worker stage.scene = scene 44*7a7160feSAndroid Build Coastguard Worker stage.show() 45*7a7160feSAndroid Build Coastguard Worker setup(hello, fab) 46*7a7160feSAndroid Build Coastguard Worker } 47*7a7160feSAndroid Build Coastguard Worker}