Class FxmlUtil
java.lang.Object
cl.obcom.desktopfx.jfx.FxmlUtil
Provides utility methods for working with FXML documents.
-
Method Details
-
load
Loads a FXML document using supplied controller. The resource name of the FXML document is assumed to be the simple name of the class of thecontrollerplus the".fxml"extension.- Parameters:
controller- the controller of the FXML document.- Returns:
- a
Parentcontaining the FXML document. - Throws:
NullPointerException- ifcontrollerisnull.FileNotFoundException- if the FXML resource was not found.IOException- if I/O error occurs loading the FXML.
-
load
Loads an FXML document using specified controller and file.- Parameters:
controller- the controller of the FXML document.fxmlFile- the resource name of the FXML document.- Returns:
- a
Parentcontaining the FXML document. - Throws:
NullPointerException- if an argument isnull.FileNotFoundException- iffxmlFilewas not found.IOException- if I/O error occurs loading the FXML.
-
load
Loads an FXML document using specified controller and URL.- Parameters:
controller- the controller of the FXML document.fxmlURL- the URL of the FXML document resource.- Returns:
- a
Parentcontaining the FXML document. - Throws:
NullPointerException- if an argument isnull.IOException- if I/O error occurs loading the FXML.
-