Package net.rgielen.fxweaver.core
Annotation Type FxmlView
-
@Documented @Retention(RUNTIME) @Target(TYPE) public @interface FxmlView
Controllers annotated with @FxmlView declare that a given FXML file should be loaded and weaved with the controller. When loaded byFxWeaver, declared FXML views will be loaded automatically with the controller as per JavaFX fx:controller facility.-
When no
value()is given, the resource name is inferred by the simple classname. A class Foo in package com.acme then references aFoo.fxml
resource found in the same package. -
When a
value(), the given value is used as declared FXML resource. If no absolute path is given, it is assumed to reside in or below the package of the declaring controller
@FxmlView public class Foo { // try to load Foo.fxml in same package } @FxmlView("view.fxml") public class Foo { // try to load view.fxml in same package } @FxmlView("/somedir/view.fxml") public class Foo { // try to load view.fxml in root package somedir }- Author:
- Rene Gielen
- See Also:
FxWeaver,FxWeaver.loadView(Class),FxWeaver.loadController(Class)
-
When no
-
-
Element Detail
-
value
String value
The FXML file to be loaded as view, as class loader location. If not given, defaulting to simple class name plus .fxml extension in the same package.- Default:
- ""
-
-