Overview
A visual node representing FXD/FXZ graphics. Typical usage:
Scene { content: FXDNode { url: "{__DIR__}mygraphics.fxz" backgroundLoading: true placeholder: Text { x: 10 y: 10 content: "Loading graphics ..."} } }
Profile: common
Variable Summary
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public-init | backgroundLoading | Boolean | false |
If true, content will be loaded asychronousy (in the background). |
|||
public-init protected | loader | FXDLoader | subclass |
Used to listen on events such as onStarted, onDone. Used to listen on events such as onStarted, onDone. Typical usage: var loader:FXDLoader; FXDNode { url: "{__DIR__}graphics.fxz} backroundLoading: true placeholder: Text { x: 10 y: 10 content: "Loading graphics ..."} loader: loader = FXDLoader { onStart: function() { println("Started loading graphics from {loader.source}"); } onDone: function() { if (loader.succeeded) { println("Graphics successfully loaded."); } else if (loader.stopped) { println("Loading graphics canceled."); } else if (loader.failed) { println("Loading graphics failes. Reason: {loader.causeOfFailure}"); } } } } Profile: common |
|||
public | placeholder | Node |
Placeholder displayed while the graphics content is being loaded. Placeholder displayed while the graphics content is being loaded. Used only when loading occurs in the background. Profile: common |
||||
public | url | String |
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. Profile: common |
Inherited Variables
javafx.scene.CustomNode
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|
Function Summary
- protected contentLoaded() : Void
- protected create() : Node
- public impl_contentLoaded() : Void
Inherited Functions
javafx.scene.CustomNode
- protected abstract create() : Node
-
Returns the root of the hierarchy that defines this
CustomNode
.Returns the root of the hierarchy that defines this
CustomNode
. Thecreate
function is called once, when theCustomNode
is constructed.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
- protected impl_createPGNode() : com.sun.javafx.sg.PGNode
javafx.fxd.FXDContent
- public addChildContent(content: FXDContent) : Void
- public getGroup(id: java.lang.String) : Group
- public getNode(id: java.lang.String) : Node
- protected getObject(id: java.lang.String) : java.lang.Object
- public bound getRoot() : Group
-
Gets the topmost node of the loaded graphics (root node).
Gets the topmost node of the loaded graphics (root node).
-
Returns
- Group
- the topmost group of the loaded graphics. In previous versions of JavaFX (1.0 and 1.1), the topmost node was exposed by the read-only variable <pre>_root</pre>.
Profile: common
- public getShape(id: java.lang.String) : Shape
- public putNode(node: Node) : Void
- public setRoot(newRoot: Node) : Group