Views
4 months ago

tornadofx-guide

Table of Contents Introduction Part 1: TornadoFX Fundamentals 1. Why TornadoFX? 2. Setting Up 3. Components 4. Basic Controls 5. Data Controls 6. Type Safe CSS 7. Layouts and Menus 8. Charts 9. Shapes and Animation 10. FXML 11. Editing Models and Validation 12. TornadoFX IDEA Plugin Part 2: TornadoFX Advanced Features Property Delegates Advanced Data Controls OSGi Scopes EventBus Workspaces Layout Debugger Internationalization Config Settings and State JSON and REST Dependency Injection Wizard 1.1 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.2.10 1.2.11 1.2.12 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.3.10 1.3.11 1.3.12 1

  • Page 2 and 3: Introduction TornadoFX Guide This i
  • Page 4 and 5: 1. Why TornadoFX? Introduction User
  • Page 6 and 7: 1. Why TornadoFX? class MyView : Vi
  • Page 8 and 9: 2. Setting Up Setting Up To use Tor
  • Page 10 and 11: 3. Components Components JavaFX use
  • Page 12 and 13: 3. Components Click the green "+" s
  • Page 14 and 15: 3. Components You should now see yo
  • Page 16 and 17: 3. Components import javafx.scene.c
  • Page 18 and 19: 3. Components import javafx.scene.c
  • Page 20 and 21: 3. Components Writing Alpha to data
  • Page 22 and 23: 3. Components If you need to handle
  • Page 24 and 25: 3. Components A good use case for t
  • Page 26 and 27: 3. Components import tornadofx.* cl
  • Page 28 and 29: 3. Components fun editCustomer(cust
  • Page 30 and 31: 3. Components concepts TornadoFX in
  • Page 32 and 33: 4. Basic Controls Alternatively, ev
  • Page 34 and 35: 4. Basic Controls import javafx.sce
  • Page 36 and 37: 4. Basic Controls For any Pane , yo
  • Page 38 and 39: 4. Basic Controls You can create a
  • Page 40 and 41: 4. Basic Controls A more idiomatic
  • Page 42 and 43: 4. Basic Controls You can also prov
  • Page 44 and 45: 4. Basic Controls progressbar(compl
  • Page 46 and 47: 4. Basic Controls ScrollPane You ca
  • Page 48 and 49: 4. Basic Controls text("Veni\nVidi\
  • Page 50 and 51: 4. Basic Controls button("Save") {
  • Page 52 and 53:

    5. Data Controls Data Controls Any

  • Page 54 and 55:

    5. Data Controls tableview(persons)

  • Page 56 and 57:

    5. Data Controls If you do not care

  • Page 58 and 59:

    5. Data Controls Notice how we cann

  • Page 60 and 61:

    5. Data Controls There are a few co

  • Page 62 and 63:

    5. Data Controls Traditionally in J

  • Page 64 and 65:

    5. Data Controls Next we specify th

  • Page 66 and 67:

    5. Data Controls val persons = list

  • Page 68 and 69:

    5. Data Controls The cellCache func

  • Page 70 and 71:

    5. Data Controls You might wonder w

  • Page 72 and 73:

    6. Type Safe CSS style(append = tru

  • Page 74 and 75:

    6. Type Safe CSS import javafx.scen

  • Page 76 and 77:

    6. Type Safe CSS Infact, manipulati

  • Page 78 and 79:

    6. Type Safe CSS Figure 6.4 Multi-V

  • Page 80 and 81:

    6. Type Safe CSS class MyStyle: Sty

  • Page 82 and 83:

    6. Type Safe CSS Now you have orang

  • Page 84 and 85:

    6. Type Safe CSS class MyApp: App(M

  • Page 86 and 87:

    6. Type Safe CSS Figure 6.10 - A ce

  • Page 88 and 89:

    7. Layouts and Menus Layouts and Me

  • Page 90 and 91:

    7. Layouts and Menus hbox { button(

  • Page 92 and 93:

    7. Layouts and Menus borderpane { t

  • Page 94 and 95:

    7. Layouts and Menus form { fieldse

  • Page 96 and 97:

    7. Layouts and Menus Awesome right?

  • Page 98 and 99:

    7. Layouts and Menus form { hbox(20

  • Page 100 and 101:

    7. Layouts and Menus gives you more

  • Page 102 and 103:

    7. Layouts and Menus gridpane { row

  • Page 104 and 105:

    7. Layouts and Menus tabpane { tab(

  • Page 106 and 107:

    7. Layouts and Menus Figure 7.14 Yo

  • Page 108 and 109:

    7. Layouts and Menus ContextMenu Mo

  • Page 110 and 111:

    7. Layouts and Menus The following

  • Page 112 and 113:

    7. Layouts and Menus Css-Class Css-

  • Page 114 and 115:

    7. Layouts and Menus squeezebox { f

  • Page 116 and 117:

    7. Layouts and Menus You can style

  • Page 118 and 119:

    7. Layouts and Menus The drawer can

  • Page 120 and 121:

    7. Layouts and Menus next to it. Yo

  • Page 122 and 123:

    8. Charts Note you can also provide

  • Page 124 and 125:

    8. Charts barchart("Unit Sales Q2 2

  • Page 126 and 127:

    8. Charts The backing data structur

  • Page 128 and 129:

    8. Charts ScatterChart A ScatterCha

  • Page 130 and 131:

    8. Charts bubblechart("Machine Capa

  • Page 132 and 133:

    9. Shapes and Animation Shapes and

  • Page 134 and 135:

    9. Shapes and Animation Arc Arc rep

  • Page 136 and 137:

    9. Shapes and Animation Ellipse Ell

  • Page 138 and 139:

    9. Shapes and Animation quadcurve {

  • Page 140 and 141:

    9. Shapes and Animation path { move

  • Page 142 and 143:

    9. Shapes and Animation Interpolato

  • Page 144 and 145:

    10. FXML FXML and Internationalizat

  • Page 146 and 147:

    10. FXML You m

  • Page 148 and 149:

    10. FXML FXML file locations By def

  • Page 150 and 151:

    10. FXML If you want to test this

  • Page 152 and 153:

    11. Editing Models and Validation E

  • Page 154 and 155:

    11. Editing Models and Validation v

  • Page 156 and 157:

    11. Editing Models and Validation I

  • Page 158 and 159:

    11. Editing Models and Validation A

  • Page 160 and 161:

    11. Editing Models and Validation Y

  • Page 162 and 163:

    11. Editing Models and Validation @

  • Page 164 and 165:

    11. Editing Models and Validation U

  • Page 166 and 167:

    11. Editing Models and Validation T

  • Page 168 and 169:

    11. Editing Models and Validation T

  • Page 170 and 171:

    11. Editing Models and Validation W

  • Page 172 and 173:

    11. Editing Models and Validation t

  • Page 174 and 175:

    11. Editing Models and Validation f

  • Page 176 and 177:

    11. Editing Models and Validation F

  • Page 178 and 179:

    12. TornadoFX IDEA Plugin You will

  • Page 180 and 181:

    12. TornadoFX IDEA Plugin In the ne

  • Page 182 and 183:

    12. TornadoFX IDEA Plugin You will

  • Page 184 and 185:

    12. TornadoFX IDEA Plugin You can t

  • Page 186 and 187:

    12. TornadoFX IDEA Plugin Do this f

  • Page 188 and 189:

    12. TornadoFX IDEA Plugin Note that

  • Page 190 and 191:

    Property Delegates Property Delegat

  • Page 192 and 193:

    Property Delegates create a functio

  • Page 194 and 195:

    Property Delegates val counterLabel

  • Page 196 and 197:

    Advanced Data Controls The default

  • Page 198 and 199:

    Advanced Data Controls Figure 13.4

  • Page 200 and 201:

    Advanced Data Controls When you har

  • Page 202 and 203:

    Advanced Data Controls Figure 5.2 -

  • Page 204 and 205:

    Advanced Data Controls Now comes th

  • Page 206 and 207:

    OSGi OSGi This chapter is geared pr

  • Page 208 and 209:

    OSGi You can provide type-safe styl

  • Page 210 and 211:

    OSGi tabPane.addViewsWhen { if (it.

  • Page 212 and 213:

    OSGi Artifact Version Binary JavaFX

  • Page 214 and 215:

    Scopes The edit function creates a

  • Page 216 and 217:

    Scopes JPro will create a new insta

  • Page 218 and 219:

    EventBus EventBus An EventBus is a

  • Page 220 and 221:

    EventBus Query Parameters In Events

  • Page 222 and 223:

    EventBus In many event bus implemen

  • Page 224 and 225:

    EventBus class MyView : View() { ov

  • Page 226 and 227:

    Workspaces The resulting Workspace

  • Page 228 and 229:

    Workspaces class MyApp: App(MyWorks

  • Page 230 and 231:

    Workspaces As mentioned, you never

  • Page 232 and 233:

    Workspaces You will notice that the

  • Page 234 and 235:

    Workspaces It looks like a default

  • Page 236 and 237:

    Workspaces class CustomerEditor : F

  • Page 238 and 239:

    Workspaces tableview { whenRefreshe

  • Page 240 and 241:

    Workspaces Some use cases might req

  • Page 242 and 243:

    Workspaces Drawer navigation The Wo

  • Page 244 and 245:

    Workspaces Figure 16.8 By right cli

  • Page 246 and 247:

    Workspaces should proceed. You can

  • Page 248 and 249:

    Layout Debugger Stop a debugging se

  • Page 250 and 251:

    Internationalization Internationali

  • Page 252 and 253:

    Internationalization A manually ove

  • Page 254 and 255:

    Config Settings and State class Log

  • Page 256 and 257:

    Config Settings and State You can a

  • Page 258 and 259:

    JSON and REST JSON and REST JSON ha

  • Page 260 and 261:

    JSON and REST The datetime(key) fun

  • Page 262 and 263:

    JSON and REST Query parameters need

  • Page 264 and 265:

    JSON and REST Default engine for ne

  • Page 266 and 267:

    Dependency Injection val MyView : V

  • Page 268 and 269:

    Wizard Wizard Some times you need t

  • Page 270 and 271:

    Wizard Figure 21.1 Just by looking

  • Page 272 and 273:

    Wizard If the user clicks the Finis

  • Page 274 and 275:

    Wizard class CustomerModel : ItemVi

  • Page 276 and 277:

    Wizard There are many built in opti

GUIDE
Guide
GUIDE
Guide
Guide
Guide
GUIDE
GUIDE
Guide
GUIDE
GUIDE
GUIDE