Summary
Samenvatting Programmeren 1 - theorie Java FX
Course
Programmeren 1 (PR1)
Een samenvatting van de theorie van Java FX, een subvak van programmeren 1 uit toegepaste informatica aan kdg.
[Show more]
Preview 4 out of 73 pages
Uploaded on
January 19, 2023
Number of pages
73
Written in
2021/2022
Type
Summary
programmeren
informatica
java
java fx
kdg
Institution
Karel de Grote-Hogeschool (KdG)
Education
Toegepaste Informatica
Course
Programmeren 1 (PR1)
All documents for this subject (4)
$5.89
Also available in package deal from $17.16
100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached
Also available in package deal (1)
Programmeren 1 - theorie
1. Summary - Programmeren 1 - theorie oo concepten (periode 1 en 2)
2. Summary - Programmeren 1 - theorie java fx
3. Summary - Programmeren 1 - theorie embedded
Show more
PROGRAMMEREN:
JAVA FX
P3
KDG | 2021-22
,Inhoudsopgave
1. Basis ...............................................................................................................................4
1.1 Wat is JavaFX? .................................................................................................................. 4
1.2 Het design pattern 'Model-View-Presenter' .................................................................... 5
1.3 Controls ............................................................................................................................ 6
1.3.1 Image ......................................................................................................................... 6
1.3.2 Label ........................................................................................................................... 7
1.3.3 ImageView ................................................................................................................. 7
1.3.4 Button ........................................................................................................................ 8
1.3.5 CheckBox .................................................................................................................... 8
1.3.6 TextField ..................................................................................................................... 9
1.3.7 ComboBox ................................................................................................................ 10
1.3.8 MenuBar, Menu, MenuItem .................................................................................... 10
1.4 Events ............................................................................................................................. 11
1.4.1 setOnAction.............................................................................................................. 12
1.4.2 ActionEvent .............................................................................................................. 13
1.4.3 KeyEvent................................................................................................................... 14
1.4.4 Quiz .......................................................................................................................... 15
1.4.5 MouseEvent ............................................................................................................. 16
1.4.6 WindowEvent ........................................................................................................... 17
1.5 Panes .............................................................................................................................. 19
1.5.1 BorderPane .............................................................................................................. 19
1.5.2 VBox ......................................................................................................................... 20
1.5.3 HBox ......................................................................................................................... 22
1.5.4 GridPane .................................................................................................................. 22
1.6 Meerdere schermen en MVP ......................................................................................... 26
1.6.1 Elk scherm: eigen view en presenter ........................................................................ 26
1.6.2 Vanuit scherm A naar scherm B in bestaande Stage ............................................... 27
1.6.3 Vanuit scherm A naar scherm B in nieuwe Stage ..................................................... 28
1.6.4 Een alert tonen ......................................................................................................... 29
1.6.5 Conclusie meerdere schermen en MVP .................................................................... 30
1.7 Basis Exceptions en MVP ................................................................................................ 30
1.7.1 Exceptions in Model ................................................................................................. 31
1.7.2 Exceptions in Presenter ............................................................................................ 32
1.8 Java FX gebruiken ........................................................................................................... 33
1.8.1 Nieuwe nodes toevoegen ......................................................................................... 33
1
, 1.8.2 Hungarian name convention .................................................................................... 33
1.8.3 Attributen van JavaFX klasseinstanties .................................................................... 33
2. Uitbreidingen ................................................................................................................ 35
2.1 Tekenen .......................................................................................................................... 35
2.1.1 Coördinaten ............................................................................................................. 36
2.1.2 Mogelijkheden ......................................................................................................... 37
2.1.3 Kleuren ..................................................................................................................... 37
2.1.4 Polygonen ................................................................................................................ 38
2.1.5 Effecten .................................................................................................................... 38
2.2 Grafieken ........................................................................................................................ 39
2.2.1 Varianten ................................................................................................................. 39
2.2.2 Geërfde methodes .................................................................................................... 40
2.2.3 PieChart.................................................................................................................... 40
2.2.4 LineChart .................................................................................................................. 41
2.3 Animaties ....................................................................................................................... 43
2.3.1 Geërfde methodes .................................................................................................... 44
2.3.2 TranslateTransition .................................................................................................. 46
2.3.3 RotateTransition ...................................................................................................... 47
2.3.4 SequentialTransition ................................................................................................ 48
2.3.5 Andere Transitions ................................................................................................... 49
2.3.6 Eigen Transitions maken .......................................................................................... 49
2.3.7 Timeline maken ........................................................................................................ 50
2.4 JavaFX en CSS ................................................................................................................. 51
2.4.1 Selectors ................................................................................................................... 52
2.4.2 Eigenschappen ......................................................................................................... 52
2.4.3 Stylesheets ............................................................................................................... 53
2.4.4 Nodes ....................................................................................................................... 53
3. Files & Streams in Java .................................................................................................. 54
3.1 Werken met bestanden.................................................................................................. 54
3.1.1 Inleiding ................................................................................................................... 54
3.1.2 Path en Paths ........................................................................................................... 55
3.1.3 File en Files ............................................................................................................... 56
3.1.4 Uitlezen van tekstbestanden met Scanner ............................................................... 58
3.1.5 URI en URL ............................................................................................................... 60
3.2 Streams .......................................................................................................................... 61
3.2.1 Inleiding ................................................................................................................... 61
2
, 3.2.2 Character Streams ................................................................................................... 64
3.2.3 Try-with-resources ................................................................................................... 67
3.2.4 Byte Streams ............................................................................................................ 68
3.2.4 System streams ........................................................................................................ 70
3.3 Strings opsplitsen ........................................................................................................... 71
3