... | ... | @@ -14,14 +14,14 @@ Each view refers to its own FXML layout file and implements the controller logic |
|
|
The composition framework is build around the `ICompositeFXController`, an interface for the hierarchic composition of controllers (and their layouts, respectively). Controllers implementing this interface can be containments of other such controllers and take containments as well.
|
|
|
The following figure illustrates the concept:
|
|
|
|
|
|
![](composition_illustration.png)
|
|
|
![](pictures/composition_illustration.png)
|
|
|
|
|
|
The illustration also captures how the hierarchic controllers are integrated with AutoFOCUS 3: As `ICompositeFXController` s can - and should be - reused in multiple views, they cannot be used to uniquely
|
|
|
identify a single view. Thus, for AF3 to reference all views within `plugin.xml` files, an almost empty class deriving from `AF3FXViewPart` is created for each of them. It contains nothing but a constructor with
|
|
|
no parameters, passing an instance of the top-most `ICompositeFXController` to the `super` constructor.
|
|
|
|
|
|
This presentation includes a more comprehensive explanation of the composition framework and how it is applied:
|
|
|
attachment:af3\_javafx\_composites.pdf
|
|
|
[AF3 JavaFX Composites](presentations/af3_javafx_composites.pdf)
|
|
|
|
|
|
Creating a user interface.
|
|
|
--------------------------
|
... | ... | @@ -44,9 +44,9 @@ Appendix |
|
|
|
|
|
If you don’t want to follow along step-by-step, here are the FXML and Java files for the following examples:
|
|
|
|
|
|
- attachment:HelloWorldLayout.fxml
|
|
|
- attachment:HelloWorldFXController.java
|
|
|
- attachment:HelloWorldFXViewPart.java
|
|
|
- [HelloWorldLayout.fxml](code/HelloWorldLayout.fxml)
|
|
|
- [HelloWorldFXController.java](code/HelloWorldFXController.java)
|
|
|
- [HelloWorldFXViewPart.java](code/HelloWorldFXViewPart.java)
|
|
|
|
|
|
#### Let’s say hello to the world.
|
|
|
|
... | ... | |