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

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

Profile: desktop, common

Overview

A class representing content loaded from an FXD content file or FXZ archive, together with ID strings used to identify individual graphic objects. For example:

 var fxdContent = FXDLoader.loadContent(URL);
 insert fxdContent.getRoot() into myScene.content;
 var myNode = fxdContent.getNode("myNode");
 var myShape = fxdContent.getShape("myShape");
 myNode.translateX = 40;
 myShape.fill = Color.WHITE;
 TranslateTransition{ node: myNode byY: 80 duration: 500ms}.play();
 
In the code above, first the content is loaded into the fxdContent variable. The root of the loaded content is inserted into the existing scene graph, which is already visible on the screen. At this point, manipulation of the loaded content begins. The myNode and myShape variables are declared, and values are assigned to them. TranslateTransition adds a little animation to the myNode object. Since the root element of fxdContent has already been inserted into the existing scene graph, all changes to the variables and animations should immediately be visible.

Profile: common

Inherited Variables

Function Summary

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;

Inherited Functions