java.lang.Object
jfxtras.fxml.JFXtrasBuilderFactory
- All Implemented Interfaces:
javafx.util.BuilderFactory
An extended BuilderFactory that uses ServiceLoader to detect any builders on the classpath.
This means builders are discovered semi-automatically by this factory.
If none of the discovered builders match, the builder forwards the request to JavaFXBuilderFactory, so this class can be used instead of that.
In order to make automatically discovered builders:
1. Implement the jfxtras.fxml.BuilderService interface instead of the javafx.util.Builder interface on all builder implementations.
2. Create a file in your project / jar called "META-INF/services/jfxtras.fxml.BuilderService"
3. In that file specify the full class name of all builders from 1 that you want to make auto-discoverable, each name on a name line.
4. Use this builder instead of the default, for example like so: FXMLLoader.load(url, null, new JFXtrasBuilderFactory());
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
javaFXBuilderFactory
private final javafx.util.BuilderFactory javaFXBuilderFactory
-
-
Constructor Details
-
JFXtrasBuilderFactory
public JFXtrasBuilderFactory()
-
-
Method Details
-
getBuilder
- Specified by:
getBuilder
in interfacejavafx.util.BuilderFactory
-