Wrap<? extends Scene> popup_scene_wrap = Root.ROOT.lookup(new LookupCriteria<Scene>() {
public boolean check(Scene scene) {
if (!(scene.getWindow() instanceof ContextMenu)) {
return false;
}
Wrap<Scene> scene_wrap = new SceneWrap(getEnvironment(), scene);
Parent<Node> parent = scene_wrap.as(Parent.class, Node.class);
return parent.lookup(Node.class, new LookupCriteria<Node>() {
public boolean check(Node node) {
if (node.getProperties().get(Menu.class) == getControl().getParentMenu()) {
return true;
}