Package 

Class FXResourceLoader

  • All Implemented Interfaces:

    
    public final class FXResourceLoader
    
                        

    Utility class for loading resources related to layout.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static <T extends Node> T getLayout(Object controller, String layoutName) Loads a layout FXML file returning the base pane defined by the layout.
      static <T extends Node> T getLayout(String layoutName) Loads a layout FXML file returning the base pane defined by the layout.
      static String getInjectionErrorMessage(String nodeName, String layoutFileName) Returns the standard message for a problem in class injection from FXML.
      static IconNode getWhiteIcon(IconCode iconCode) Loads an icon from Google Material Design Icons filled in white.
      static IconNode getColoredIcon(IconCode iconCode, Color color) Loads an icon from Google Material Design Icons.
      static String getStyle(String cssFileName) Returns the java.net.URL to a CSS stylesheet of given name in string form.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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 layout
        layoutName - 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 injected
        layoutFileName - 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