We have multiple GUI project based on JavaFX. Our goal now is to refactor a lot of these GUI's and to extract common views and source code and make this common code available through libs (bundle jar's). I currently have the problem that I have a View which displays log files and which is included via an FXML in the main view
<fx:include fx:id="logFileView" source="./sub/LogView.fxml"
maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity"
minWidth="-Infinity" prefHeight="600" prefWidth="1000"
style="-fx-background-color: rgba(0, 0, 0, 0.0);"
StackPane.alignment="CENTER_RIGHT" />
The LogView.fxml
incorporates it's controller
fx:controller="auv.e4.application.analyser.controller.sub.LogViewController"
but this LogView.fxml
is now placed in a common lib (bundle jar) and should be accessible by any of our GUIS's
We have like 50 different views which are structured this way and I would prefer using the FXML this way.
Another problem is the common lib will be bundle project (otherwise the RCP GUI can*t resolve them as dependencies) which makes using absolute paths impossible (Which is alo not a good practice). The GUIs are RCP based GUI's which use JavaFX for rendering.
My question is now how do I reference the LogView.fxml
from an another project from inside an FXML (with fx:include
) ? Is this possible ? If not what kind of restructuring should /can be be done ?