Java examples for JavaFX:Node
JavaFX Node Is Child Of Class
//package com.java2s; import javafx.scene.Node; public class Main { public static boolean NodeIsChildOfClass(Node child, Class<? extends Node> c) { if (child == null) { return false; } else if (c.isInstance(child)) { return true; } else {/*from w w w. j a v a2 s . com*/ return NodeIsChildOfClass(child.getParent(), c); } } }