public final class FXMLLoaders extends Object
FXMLLoader
.Modifier and Type | Method and Description |
---|---|
static FXMLLoader |
createFXMLLoader(ClassLoader classLoader)
Creates a new
FXMLLoader . |
static <T> T |
load(Class<?> type)
Loads the <class name>.fxml file, which is expected to be in the same package as the specified type.
|
static <T> T |
load(Class<?> type,
ResourceBundle resourceBundle)
Loads the <class name>.fxml file, which is expected to be in the same package as the specified type.
|
static <T> T |
load(FXMLLoader loader,
Class<?> type)
Loads the <class name>.fxml file, which is expected to be in the same package as the specified type.
|
static <T> T |
load(FXMLLoader loader,
Class<?> type,
ResourceBundle resourceBundle)
Loads the <class name>.fxml file, which is expected to be in the same package as the specified type.
|
static void |
loadRoot(FXMLLoader loader,
Object rootController)
Loads the <class name>.fxml file, where <class name> is the type of the specified rootController and
the FXML-file is expected to be in the same package.
|
static void |
loadRoot(FXMLLoader loader,
Object rootController,
ResourceBundle resourceBundle)
Loads the <class name>.fxml file, where <class name> is the type of the specified rootController and
the FXML-file is expected to be in the same package.
|
static void |
loadRoot(Object rootController)
Loads the <class name>.fxml file, where <class name> is the type of the specified rootController and
the FXML-file is expected to be in the same package.
|
static void |
loadRoot(Object rootController,
ResourceBundle resourceBundle)
Loads the <class name>.fxml file, where <class name> is the type of the specified rootController and
the FXML-file is expected to be in the same package.
|
static void |
resetFXMLLoader(FXMLLoader loader)
Resets the following properties of the specified
FXMLLoader to null:
root
controller
controllerFactory
resources
location
|
public static FXMLLoader createFXMLLoader(ClassLoader classLoader)
classLoader
- the ClassLoader
FXMLLoader
public static void resetFXMLLoader(FXMLLoader loader)
FXMLLoader
to null:
public static void loadRoot(Object rootController)
ClassLoader
to the ClassLoader of the specified typeResourceBundle
by looking for a <name>.properties
file, where <name>
is equal to
the name of the type of the rootController (or a locale specific derivation using the default
Locale
)<fx:root type="{super-type}" xmlns:fx="http://javafx.com/fxml">
rootController
- the Object acting as the root and as the controller.public static void loadRoot(FXMLLoader loader, Object rootController)
ResourceBundle
by looking for a <name>.properties
file, where <name>
is equal to
the name of the specified type (or a locale specific derivation using the default Locale
)<fx:root type="{super-type}" xmlns:fx="http://javafx.com/fxml">
loader
- the FXMLLoader
rootController
- the Object acting as the root and as the controller.resetFXMLLoader(javafx.fxml.FXMLLoader)
public static void loadRoot(Object rootController, ResourceBundle resourceBundle)
ClassLoader
to the ClassLoader of the specified typeResourceBundle
to the specified resourceBundle<fx:root type="{super-type}" xmlns:fx="http://javafx.com/fxml">
rootController
- the Object acting as the root and as the controller.resourceBundle
- the ResourceBundle
the FXMLLoader
should use.public static void loadRoot(FXMLLoader loader, Object rootController, ResourceBundle resourceBundle)
ResourceBundle
to the specified resourceBundle<fx:root type="{super-type}" xmlns:fx="http://javafx.com/fxml">
loader
- the FXMLLoader
rootController
- the Object acting as the root and as the controller.resourceBundle
- the ResourceBundle
the FXMLLoader
should use.resetFXMLLoader(javafx.fxml.FXMLLoader)
public static <T> T load(Class<?> type)
ClassLoader
to the ClassLoader of the specified typeResourceBundle
by looking for a <name>.properties
file, where <name>
is equal to
the name of the specified type (or a locale specific derivation using the default Locale
)T
- the type of the root elementtype
- the typeresetFXMLLoader(javafx.fxml.FXMLLoader)
public static <T> T load(FXMLLoader loader, Class<?> type)
ResourceBundle
by looking for a <name>.properties
file, where <name>
is equal to
the name of the specified type (or a locale specific derivation using the default Locale
)T
- the type of the root elementloader
- the FXMLLoader
type
- the typeresetFXMLLoader(javafx.fxml.FXMLLoader)
public static <T> T load(Class<?> type, ResourceBundle resourceBundle)
ClassLoader
to the ClassLoader of the specified typeResourceBundle
to the specified resourceBundleT
- the type of the root elementtype
- the typeresourceBundle
- the ResourceBundle
the FXMLLoader
should use.resetFXMLLoader(javafx.fxml.FXMLLoader)
public static <T> T load(FXMLLoader loader, Class<?> type, ResourceBundle resourceBundle)
ResourceBundle
to the specified resourceBundleT
- the type of the root elementloader
- the FXMLLoader
type
- the typeresourceBundle
- the ResourceBundle
the FXMLLoader
should use.resetFXMLLoader(javafx.fxml.FXMLLoader)
Copyright © 2012–2019 Drombler. All rights reserved.