Spec-Zone .ru
спецификации, руководства, описания, API

JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

Profile: desktop, common

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

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
public-initbackgroundLoadingBooleanfalse

If true, content will be loaded asychronousy (in the background).

public-init protectedloaderFXDLoadersubclass

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

 
publicplaceholderNode

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

 
publicurlString

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

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription

Function Summary

protected contentLoaded() : Void

Called when the content has been successfully loaded.

Called when the content has been successfully loaded.

Profile: common

 
protected create() : Node

Creates the FXD node.

Creates the FXD node.

Returns
Node
Node

Profile: common

 
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. The create function is called once, when the CustomNode 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
Returns
PGNode
 

javafx.fxd.FXDContent

public addChildContent(content: FXDContent) : Void
Parameters
content
 
public getGroup(id: java.lang.String) : Group

Gets a group with the given ID, or null if there is no such group.

Gets a group with the given ID, or null if there is no such group.

Parameters
id
The ID of the group to be looked for
Returns
Group
Group The group that was found, or null if there is no such group with given ID
 
public getNode(id: java.lang.String) : Node

Gets a node with the given ID, or returns null if there is no such node.

Gets a node with the given ID, or returns null if there is no such node.

Parameters
id
The ID of the node to be looked for
Returns
Node
Node The node that was found, or null if there is no such node with given ID
 
protected getObject(id: java.lang.String) : java.lang.Object

Gets an object for the given ID, or null if there is no such object.

Gets an object for the given ID, or null if there is no such object.

Parameters
id
The ID of the object to be looked for
Returns
Object
Object The object that was found, or null if there is no object with given ID
 
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

&nbsp;
public getShape(id: java.lang.String) : Shape

Gets a shape with the given ID, or null if there is no such shape.

Gets a shape with the given ID, or null if there is no such shape.

Parameters
id
The ID of the shape to be looked for
Returns
Shape
Shape The shape that was found, or null if there is no shape with the given ID
&nbsp;
public putNode(node: Node) : Void

Puts object to the Content

Puts object to the Content

Parameters
node
obj
&nbsp;
public setRoot(newRoot: Node) : Group
Parameters
newRoot
Returns
Group
&nbsp;