public class MvvmFX extends Object
| Constructor and Description |
|---|
MvvmFX() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addGlobalBuilderFactory(javafx.util.BuilderFactory factory)
Add a
BuilderFactory to be used by mvvmFX. |
static NotificationCenter |
getNotificationCenter() |
static void |
setCustomDependencyInjector(javafx.util.Callback<Class<?>,Object> injector)
This method is used to integrate the mvvmFX framework into your dependency injection environment.
|
static void |
setGlobalResourceBundle(ResourceBundle resourceBundle)
This method is used to set a global
ResourceBundle for the application. |
public static NotificationCenter getNotificationCenter()
NotificationCenter.public static void setCustomDependencyInjector(javafx.util.Callback<Class<?>,Object> injector)
FXMLLoader.setControllerFactory(javafx.util.Callback) that is normally used with JavaFX's
fxml.injector - a callback that returns instances for given class types.public static void setGlobalResourceBundle(ResourceBundle resourceBundle)
ResourceBundle for the application.
This resource bundle is automatically loaded for all views. If there is an resourceBundle provided
while loading the view (via FluentViewLoader.FxmlViewStep.resourceBundle(ResourceBundle) or
FluentViewLoader.JavaViewStep.resourceBundle(ResourceBundle)) both resourceBundles will be merged.
The global resourceBundle set by this method will have a lower priority then the ones provided while loading. If there are keys available in both resourceBundles, the values of the global resourceBundle will be overwritten.
resourceBundle - the resourceBundlepublic static void addGlobalBuilderFactory(javafx.util.BuilderFactory factory)
BuilderFactory to be used by mvvmFX.
BuilderFactory is used to enable custom controls that need special initialization to be used with FXML.
MvvmFX can manage multiple builder factories. If you add multiple factories that can provide builders for the same type,
the last added builder factory will be used. This way it's possible to "overwrite" a more abstract builder factory with a more specific
factory.
JavaFXBuilderFactory. If no custom builder factory
is able to provide a builder for a given type the default JavaFX builder factory will be used as last resort.
This way you don't have to take care for standard JavaFX types in your builder factory.
FluentViewLoader with the parameter
FluentViewLoader.FxmlViewStep.builderFactory(BuilderFactory) instead.
In this case the provided builder factory is again combined with the global factories (if defined).
Builder factories provided via FluentViewLoader have a higher priority then global builder factories.factory - the builder factoryCopyright © 2019 Saxonia Systems AG. All rights reserved.