Class FXMLLoaderUtil.ViewLoader<T>
java.lang.Object
com.serinity.accesscontrol.util.FXMLLoaderUtil.ViewLoader<T>
- Type Parameters:
T- The type of the controller associated with the FXML.
- Enclosing class:
FXMLLoaderUtil
Wrapper class that holds both the loaded FXML root node and its controller.
This is typically used for navigation systems to access both the root node to add to a layout (e.g., StackPane) and the controller to inject dependencies or configure callbacks.
- Since:
- 2026-01-28 FXMLLoaderUtil.java
- Version:
- 1.0
- Author:
- @ZouariOmar (zouariomar20@gmail.com)
-
Constructor Summary
ConstructorsConstructorDescriptionViewLoader(javafx.scene.Parent root, T controller) Creates a holder for a loaded view and its controller. -
Method Summary
Modifier and TypeMethodDescriptionReturns the controller resolved by FXMLLoader.javafx.scene.ParentgetRoot()Returns the loaded root node.
-
Constructor Details
-
ViewLoader
Creates a holder for a loaded view and its controller.- Parameters:
root- loaded FXML root nodecontroller- controller instance resolved by FXMLLoader
-
-
Method Details
-
getRoot
public javafx.scene.Parent getRoot()Returns the loaded root node.- Returns:
- loaded root node
-
getController
-