The URL from which the JavaFX content (FXD or FXZ file) will be loaded.

The URL from which the JavaFX content (FXD or FXZ file) will be loaded.

When background loading is not used (

backgroundLoading = false

, default value),
only local files (files packaged with the application) should be loaded
to prevent the application from becoming unresponsive.

Note: When running the code on mobile devices, only FXZ files that are uncompressed to a
directory or FXD files are supported for remote access, not remote FXZ files (files
that are not packaged within the application).
The desktop profile supports all file formats either locally or remotely.

Inherited Functions

javafx.scene.CustomNode

Returns the root of the hierarchy that defines this CustomNode.
This is an optional function that may be overridden by a subclass of
CustomNode to define its content.

The create function is called once, from the postinit block of
the CustomNode base class, when the
CustomNode is constructed. Applications that extend
CustomNode should be aware that the subclass' create
function is called after its init block, but before its postinit block.

The create function is called only if the children
sequence of the subclass is empty when the postinit block is run. In the
case where it is called, the returned node is added to the children
sequence as the sole child, and may not be added to any other
Group or CustomNode.

See the class documentation for Node for scene graph structure
restrictions on nodes returned from the create function.
If the returned node violates these restrictions,
IllegalArgumentException is thrown during
initialization.

Returns

Node

Profile: common

protecteddoLayout()
:
Void

Invoked during the layout pass to layout the children in this CustomNode.

Invoked during the layout pass to layout the children in this CustomNode.
By default it will set the size of managed javafx.scene.layout.Resizable content to their
preferred sizes.

Subclasses should override this function to layout children as needed.

Returns metadata associated with given FX object. Metadata properties
can be defined within any FXD element which is later used to construct FX object.
The name of metadata property is always enclosed in quotation marks.
The metadata is not processed by FXD loader and must be understood and
handled by an application logic. FXDLoader just parses and provides it
to the application logic when required. For example:

In the FXD fragment above three metadata properties - "can.explode", "explosion.range"
and "explosion.sound" are defined for Rectangle element with id "barrel".
Below is code example that uses them in application layer:

Gets an object or property selected by the given query. In case there are several
objects only the first one is returned. The query syntax has been inspired by
XPath syntax and uses element identifiers and property names to select what will
be returned. The element identifiers are separated with forward slash characters ('/')
and the dot (.) is used to denote a property.The insignificant elements (i.e.
those without any id defined) are skipped completely during query resolution.
For example this code

...
// load fxd content
var fxdContent = FXDLoader.loadContent("...");
// select the rectangle with id "rect" which is direct child
// of the group with id "group1"
var rect = fxdContent.select( "/group1/rect") as Rectangle;
// select the fill property of the rectangle with id "rect" which
// is indirect child of the group with id "group2"
var color = fxdContent.select( "/group2/rect.fill") as Color;
...