FxmlService is a Spring service that manages the loading of FXML files and updating the root of the JavaFX scene.
More...
|
public< T > T | getController () |
| Retrieves the controller associated with the loaded FXML file.
|
|
FxmlService is a Spring service that manages the loading of FXML files and updating the root of the JavaFX scene.
This service allows for dynamic changes to the user interface by loading different FXML files based on the application's needs.
◆ FxmlService()
fr.softsf.sudokufx.service.FxmlService.FxmlService |
( |
FXMLLoader | fxmlLoader | ) |
|
Constructor for FxmlService.
This constructor initializes the scene by retrieving the current scene from the main application class.
◆ getController()
public< T > T fr.softsf.sudokufx.service.FxmlService.getController |
( |
| ) |
|
|
package |
Retrieves the controller associated with the loaded FXML file.
- Parameters
-
<T> | the type of the controller |
- Returns
- the controller instance of type T
- Exceptions
-
IllegalStateException | if the FXML file has not been loaded yet |
◆ setRootByFXMLName()
void fr.softsf.sudokufx.service.FxmlService.setRootByFXMLName |
( |
final String | fxml | ) |
|
Sets the root of the scene based on the given FXML file name, and adapt the font size dynamically.
- Parameters
-
fxml | The name of the FXML file to load (without the .fxml extension) |
- Exceptions
-
IllegalArgumentException | if the FXML file is not found |
RuntimeException | Exits the application if an error occurs while loading the FXML file |
◆ dynamicFontSize
◆ fxmlLoader
final FXMLLoader fr.softsf.sudokufx.service.FxmlService.fxmlLoader |
|
private |
◆ scene
final Scene fr.softsf.sudokufx.service.FxmlService.scene |
|
private |
The documentation for this class was generated from the following file: