public class GuiceFXMLLoader extends Object
The easiest way to use this class is by just injecting it into your JavaFX application in the right places.
FXMLLoader| Modifier and Type | Class and Description |
|---|---|
static class |
GuiceFXMLLoader.Result
A simple wrapper around the result of a FXML loading operation.
|
| Constructor and Description |
|---|
GuiceFXMLLoader(com.google.inject.Injector injector,
FXMLLoadingScope fxmlLoadingScope)
This constructor is usually never called directly.
|
| Modifier and Type | Method and Description |
|---|---|
GuiceFXMLLoader.Result |
load(URL url)
Loads an object hierarchy from a FXML document.
|
GuiceFXMLLoader.Result |
load(URL url,
ResourceBundle resources)
Loads an object hierarchy from a FXML document.
|
@Inject
public GuiceFXMLLoader(com.google.inject.Injector injector,
FXMLLoadingScope fxmlLoadingScope)
Instead use an existing Injector instance
to fetch an instance of this class.
injector - Usually injected via Guice.fxmlLoadingScope - Usually injected via Guice.IllegalArgumentException - if you try to pass a null value as
injector instance.IllegalStateException - if the injector has no binding for the FXMLController
loading scope.public GuiceFXMLLoader.Result load(URL url, ResourceBundle resources) throws IOException
A simple wrapper around the
load method
of JavaFX' FXMLLoader class that adds a tiny notch of Guice-related
magic.
url - URL of the FXML resource to be loaded.resources - Resources to be used to localize strings.IOExceptionFXMLLoader.load(URL, ResourceBundle)public GuiceFXMLLoader.Result load(URL url) throws IOException
A simple wrapper around the
load method
of JavaFX' FXMLLoader class that adds a tiny notch of Guice-related
magic.
url - URL of the FXML resource to be loaded.IOExceptionFXMLLoader.load(URL)Copyright © 2012-2014 The Cat Hive Developers. All Rights Reserved.