@Nullable
	@SuppressWarnings("unchecked")
	public static <T extends Node> T getParentOfType(@Nonnull Node node, @Nonnull Class<T> parentType) {
		Parent parent = node.getParent();
		while (parent != null) {
			if (parent.getClass().isAssignableFrom(parentType)) return (T) parent;
			parent = parent.getParent();
		}
		return null;
	}
@param node
		Node to search hierarchy of.
@param parentType
		Parent type to check for.
@param <T>
		Parent type.

@return Matching parent node in hierarchy, or {@code null} if nothing matched.
recaf-ui/src/main/java/software/coley/recaf/util/SceneUtils.java