Closed wanisramdani closed 4 years ago
WorldView doesn't have to be a "controller". It only needs to do its job (i.e. manipulate the user interface).
Remember Philo's SimView? You only passed a Document
to it and then SimView extracted the elements it needed and used them.
The same can be done with WorldView: The whole Stage
or just a Group
of elements can be passed to WorldView
upon instantiation..
The solution is to create a custom controller
Reference: https://docs.oracle.com/javafx/2/fxml_get_started/custom_control.htm