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

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

Profile: desktop, common

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

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
public-read_rootGroup

Root node of the topmost node of the loaded graphics

Inherited Variables

Function Summary

public getGroup(id: java.lang.String) : Group

A helper function for getting a Group scene graph node from the loaded graphics with the given ID

A helper function for getting a Group scene graph node from the loaded graphics with the given ID

Parameters
id
The ID of the group to get
Returns
Group
Group The group that was found
 
public getNode(id: java.lang.String) : Node

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

Gets the node with the given ID, or 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
 
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

A helper function for getting a Shape scene graph node from the loaded graphics with the given ID

A helper function for getting a Shape scene graph node from the loaded graphics with the given ID

Parameters
id
The ID of the Shape to get
Returns
Shape
Shape The Shape that was found
 
protected impl_createLoadContext() : com.sun.javafx.tools.fxd.LoadContext

creates new load context ...

creates new load context ...

Returns
LoadContext
 
public impl_getLoadContext() : com.sun.javafx.tools.fxd.LoadContext
Returns
LoadContext
 
public impl_getNodeMap() : java.util.Map
Returns
Map
 
public impl_setRoot(newRoot: Node) : Group
Parameters
newRoot
Returns
Group
 

Inherited Functions