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
- 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