Package cl.obcom.desktopfx.jfx
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 thecontroller
plus the".fxml"
extension.- Parameters:
controller
- the controller of the FXML document.- Returns:
- a
Parent
containing the FXML document. - Throws:
NullPointerException
- ifcontroller
isnull
.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
Parent
containing the FXML document. - Throws:
NullPointerException
- if an argument isnull
.FileNotFoundException
- iffxmlFile
was 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
Parent
containing the FXML document. - Throws:
NullPointerException
- if an argument isnull
.IOException
- if I/O error occurs loading the FXML.
-