Example usage for javax.media.j3d Locale getAllBranchGraphs

List of usage examples for javax.media.j3d Locale getAllBranchGraphs

Introduction

In this page you can find the example usage for javax.media.j3d Locale getAllBranchGraphs.

Prototype

public Enumeration getAllBranchGraphs() 

Source Link

Document

Gets an Enumeration object of all branch graphs in this Locale.

Usage

From source file:TreePrinter.java

private void printTree(Locale l, int graphDepth, Set sharedGroups) {
    printNode(l, 0, sharedGroups);/*from  w w w .  j a v a 2s  . co  m*/
    try {
        Enumeration e = l.getAllBranchGraphs();
        while (e.hasMoreElements()) {
            Object o = e.nextElement();
            if (o instanceof Locale)
                printTree((Locale) o, graphDepth + 1, sharedGroups);
            else if (o instanceof SceneGraphObject)
                printTree((SceneGraphObject) o, graphDepth + 1, sharedGroups);
            else
                printStream.println(o + " unknown and in tree");
        }
    } catch (CapabilityNotSetException e) {
        printStream.println("No capability to read children");
    }
}