Overview
A class representing contend loaded from an FXD content file or FXZ archive, together with ID strings used to identify individual graphic elements. For example:
var fxdContent = FXDLoader.loadContent(URL); insert fxdContent._root 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. 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
Variable Summary
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public-read | _root | Group |
Root node of the topmost node of the loaded graphics |
Inherited Variables
Function Summary
- public getGroup(id: java.lang.String) : Group
- public getNode(id: java.lang.String) : Node
- protected getObject(id: java.lang.String) : java.lang.Object
-
Gets the object with the given ID, or null if there is no such node.
Gets the object with the given ID, or null if there is no such node. A helper method for getting an object from the loaded graphics with the given ID.
-
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 such object
- public getShape(id: java.lang.String) : Shape
- protected impl_createLoadContext() : com.sun.javafx.tools.fxd.LoadContext
- public impl_getLoadContext() : com.sun.javafx.tools.fxd.LoadContext
- public impl_getNodeMap() : java.util.Map
- public impl_setRoot(newRoot: Node) : Group