9. Shapes and Animation Ellipse Ellipse represents an ellipse with parameters specifying size and location. ellipse { centerX = 50.0 centerY = 50.0 radiusX = 100.0 radiusY = 50.0 fill = Color.CORAL } Line Line is fairly straight forward. Supply start and end coordinates to draw a line between the two points. line { startX = 50.0 startY = 50.0 endX = 150.0 endY = 100.0 } 136
9. Shapes and Animation Polyline A Polyline is defined by an array of segment points. Polyline is similar to Polygon , except it is not automatically closed. polyline(0.0, 0.0, 80.0, 40.0, 40.0, 80.0) QuadCurve The Quadcurve represents a quadratic Bézier parametric curve segment in (x,y) coordinate space. Drawing a curve that intersects both the specified coordinates ( startX , startY ) and ( endX , endY ), using the specified point ( controlX , controlY ) as Bézier control point. 137
Table of Contents Introduction Part
Part 1: TornadoFX Fundamentals Part
1. Why TornadoFX? how Kotlin can si
1. Why TornadoFX? tableview { items
2. Setting Up 1.8 Then this goes
3. Components However, we might wan
3. Components Specify the name of y
3. Components class MyApp: App(MyVi
3. Components import javafx.scene.c
3. Components Here is a simple exam
3. Components The VBox contains a L
3. Components Argument Type Descrip
3. Components Argument Type Descrip
3. Components import tornadofx.* cl
3. Components Sometimes it is neces
4. Basic Controls Basic Controls On
4. Basic Controls 3. The Button is
4. Basic Controls If you need to sa
4. Basic Controls Figure 4.4 You ca
4. Basic Controls You do not need t
4. Basic Controls radiobutton("Powe
4. Basic Controls ProgressBar A Pro
4. Basic Controls Like most other c
4. Basic Controls Keep in mind that
4. Basic Controls button("Commit")
4. Basic Controls 51
5. Data Controls val greekLetters =
5. Data Controls class Person(id: I
5. Data Controls tableview(persons)
5. Data Controls This more closely
5. Data Controls The rowExpander()
5. Data Controls Let's break this d
5. Data Controls data class Departm
5. Data Controls val tableData = ma
5. Data Controls val numbers = (1..
6. Type Safe CSS Type-Safe CSS Whil
6. Type Safe CSS import javafx.scen
6. Type Safe CSS You can apply styl
6. Type Safe CSS Figure 6.3 Note al
6. Type Safe CSS label("Lore Ipsum"
6. Type Safe CSS If you want the bu
6. Type Safe CSS import javafx.scen
12. TornadoFX IDEA Plugin You will
Part 2: TornadoFX Advanced Features
Property Delegates class MyView: Vi
Property Delegates class Bar { var
Advanced Data Controls Advanced Dat
Advanced Data Controls This fine-tu
Advanced Data Controls This setting
Advanced Data Controls class MyView
Advanced Data Controls Assign If Nu
Advanced Data Controls 205
OSGi The dynamic nature of OSGi len
OSGi class Dashboard : View() { ove
OSGi Requirements To run TornadoFX
Scopes Scopes Scope is a simple con
Scopes Now whenever you access the
Scopes Testing with Scopes Since Sc
EventBus A button in the UI can fir
EventBus When you create a subclass
EventBus Many feel that events migh
Workspaces Workspaces Java Business
Workspaces To keep things focused,
Workspaces fun TabPane.connectWorks
Workspaces Modifying the default wo
Workspaces Title and heading When a
Workspaces Navigating between docke
Workspaces We can see that the titl
Workspaces workspace.dockInNewScope
Workspaces A Workspace in Tabs mode
Workspaces // A Form based View we
Workspaces This could be a good ide
Layout Debugger Layout Debugger Whe
Layout Debugger yet, submit a pull
Internationalization You can add a
Config Settings and State Config se
Config Settings and State If the re
Config Settings and State var bool:
JSON and REST } } with(json) { add(
JSON and REST Basic operations Ther
JSON and REST To configure authenti
Dependency Injection Dependency Inj
Dependency Injection This initializ
Wizard class BasicData : View("Basi
Wizard When the Next or Finish butt
Wizard val wizard = find() wizard.s
Wizard class CustomerWizard : Wizar
Wizard Structural modifications The