Overview
A class which loads JavaFX content files - FXD (plain text) or FXZ (a compreseed archive with embedded binary assets). Usage:
var group:Group .... // a graphics group defined elsewhere var fxdContent = FXDLoader.load(URL}; // loads the content insert fxdContent into group.content; // inserts the fxd content into the group
Profile: common
Inherited Variables
Function Summary
- public load(url: java.lang.String) : Node
-
Loads a JavaFX content file from a given URL and returns the top root node.
Loads a JavaFX content file from a given URL and returns the top root node.
Please note, since the loading is a blocking operation, only local files should be loaded to prevent the application is not responsive.
-
Parameters
- url
- The URL from which the file should be loaded
-
Returns
- Node
- Node The top root node of the loaded content
- public loadContent(url: java.lang.String) : FXDContent
-
Loads a JavaFX content file from a given URL and returns a javafx.fxd.FXDContent object, which can be used to easily access named elements (elements with the
id
variable specified).Loads a JavaFX content file from a given URL and returns a javafx.fxd.FXDContent object, which can be used to easily access named elements (elements with the
id
variable specified).Please note, since the loading is a blocking operation, only local files should be loaded to prevent the application is not responsive.
-
Parameters
- url
- The URL from which the file should be loaded
-
Returns
- FXDContent
- NodeMap