Annotation Interface Controller
Annotation used to mark controllers.
Controllers are used to control inputs and connect the view with the model.
For controllers which should be reusable inside other controllers ("subcomponents"), see Component.
It is recommended to use Component instead of Controller as it is more flexible.
-
Optional Element Summary
Optional Elements
-
Element Details
-
view
String viewThe view that should be rendered when displaying the controller. This can either be a path to an FXML file or a method that returns aNode.If nothing is specified the default naming scheme for an FXML file will be used (ExampleController --> Example.fxml).
Example: '#myMethod' will call the method myMethod() in the controller and use the returned
Parent(throwing an exception if the method does not exist or is invalid).Example: 'path/to/myView.fxml' will load the FXML file myView.fxml and use its root node as the view.
- Returns:
- The String specifying the view.
- Default:
- ""
-