The code sample underneath demonstrates the issue. Subnodes of a CustomNode can not be looked up.
--------------------------------------------------------------------------------------------------------------------
Product Version: NetBeans IDE 6.8 (Build 200912041610)
Java: 1.6.0_17; Java HotSpot(TM) 64-Bit Server VM 14.3-b01
System: Linux version 2.6.31-16-generic running on amd64; UTF-8; en_US (nb)
--------------------------------------------------------------------------------------------------------------------
import javafx.scene.CustomNode;
import javafx.scene.Node;
import javafx.scene.text.Text;
import javafx.scene.Group;
class Test extends CustomNode {
def one = Text {
id: "one"
}
def two = Text {
id: "two"
}
def three = Text {
id: "three"
}
def group = Group {
content: [ one, two, three ]
}
override protected function create () : Node {
group;
}
}
def node = Test{};
// returns null
def lu = node.lookup("two");
println("Looked up object {lu}");
--------------------------------------------------------------------------------------------------------------------
Product Version: NetBeans IDE 6.8 (Build 200912041610)
Java: 1.6.0_17; Java HotSpot(TM) 64-Bit Server VM 14.3-b01
System: Linux version 2.6.31-16-generic running on amd64; UTF-8; en_US (nb)
--------------------------------------------------------------------------------------------------------------------
import javafx.scene.CustomNode;
import javafx.scene.Node;
import javafx.scene.text.Text;
import javafx.scene.Group;
class Test extends CustomNode {
def one = Text {
id: "one"
}
def two = Text {
id: "two"
}
def three = Text {
id: "three"
}
def group = Group {
content: [ one, two, three ]
}
override protected function create () : Node {
group;
}
}
def node = Test{};
// returns null
def lu = node.lookup("two");
println("Looked up object {lu}");
- is blocked by
-
JDK-8107930 Need to document that Node.lookup() does not descend into a CustomNode
-
- Resolved
-