-
- All Implemented Interfaces:
public final class FXResourceLoaderUtility class for loading resources related to layout.
-
-
Method Summary
Modifier and Type Method Description static <T extends Node> TgetLayout(Object controller, String layoutName)Loads a layout FXML file returning the base pane defined by the layout. static <T extends Node> TgetLayout(String layoutName)Loads a layout FXML file returning the base pane defined by the layout. static StringgetInjectionErrorMessage(String nodeName, String layoutFileName)Returns the standard message for a problem in class injection from FXML. static IconNodegetWhiteIcon(IconCode iconCode)Loads an icon from Google Material Design Icons filled in white. static IconNodegetColoredIcon(IconCode iconCode, Color color)Loads an icon from Google Material Design Icons. static StringgetStyle(String cssFileName)Returns the java.net.URL to a CSS stylesheet of given name in string form. -
-
Method Detail
-
getLayout
static <T extends Node> T getLayout(Object controller, String layoutName)
Loads a layout FXML file returning the base pane defined by the layout.
- Parameters:
controller- the controller to associate to that layoutlayoutName- the name of the layout; it should be the file name without extension
-
getLayout
static <T extends Node> T getLayout(String layoutName)
Loads a layout FXML file returning the base pane defined by the layout. It doesn't set any controller.
- Parameters:
layoutName- the name of the layout; it should be the file name without extension
-
getInjectionErrorMessage
static String getInjectionErrorMessage(String nodeName, String layoutFileName)
Returns the standard message for a problem in class injection from FXML.
- Parameters:
nodeName- the name of the node that was not injectedlayoutFileName- the layout file name
-
getWhiteIcon
static IconNode getWhiteIcon(IconCode iconCode)
Loads an icon from Google Material Design Icons filled in white.
- Parameters:
iconCode- the IconCode (from GoogleMaterialDesignIcons)
-
getColoredIcon
static IconNode getColoredIcon(IconCode iconCode, Color color)
Loads an icon from Google Material Design Icons.
- Parameters:
iconCode- the IconCode (from GoogleMaterialDesignIcons)color- the color to fill the icon with
-
getStyle
static String getStyle(String cssFileName)
Returns the java.net.URL to a CSS stylesheet of given name in string form.
- Parameters:
cssFileName- the CSS file name without extension
-
-
-
-