Vector3f loc = new Vector3f(0.0f, 0.0f, -100.0f); Vector3f left = new Vector3f(1.0f, 0.0f, 0.0f); Vector3f up = new Vector3f(0.0f, 1.0f, 0.0f); Vector3f dir = new Vector3f(0.0f, 0f, 1.0f); cam.setFrame(loc, left, up, dir); cam.update();  display.setTitle("Test Scene Graph");  lightState.setEnabled(false);  key = InputSystem.getKeyInput(); KeyBindingManager.getKeyBindingManager().setKeyInput(key);  KeyBindingManager.getKeyBindingManager().set( "notex", KeyInput.KEY_7);  KeyBindingManager.getKeyBindingManager().set( "tex1", KeyInput.KEY_8);  KeyBindingManager.getKeyBindingManager().set( "tex2", KeyInput.KEY_9);  KeyBindingManager.getKeyBindingManager().set( "tex3", KeyInput.KEY_0);  KeyBindingManager.getKeyBindingManager().set( "tog_bounds", KeyInput.KEY_B);  Vector3f min = new Vector3f( -5, -5, -5); Vector3f max = new Vector3f(5, 5, 5); AlphaState as1 = display.getRenderer().getAlphaState(); as1.setBlendEnabled(true); as1.setSrcFunction(AlphaState.SB_SRC_ALPHA); as1.setDstFunction(AlphaState.DB_ONE); as1.setTestEnabled(true); as1.setTestFunction(AlphaState.TF_GREATER); as1.setEnabled(true);  DirectionalLight dr = new DirectionalLight(); dr.setDiffuse(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f)); dr.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f)); dr.setDirection(new Vector3f(0, 0, 150)); dr.setEnabled(true); lightState.detachAll(); lightState.attach(dr);  text = new Text("Selected Node", "Selected Node: Node 1"); text.setLocalTranslation(new Vector3f(0, 20, 0)); fpsNode.attachChild(text);  scene = new Node("3D Scene Node");  CullState cs = display.getRenderer().getCullState(); cs.setCullMode(CullState.CS_BACK); cs.setEnabled(true); rootNode.setRenderState(cs);  selectionBox = new Box("Selection", min.mult(1.25f), max.mult(1.25f)); selectionBox.setSolidColor(new ColorRGBA(0, 1, 0, 0.5f)); selectionBox.setRenderState(as1); selectionBox.setModelBound(new BoundingSphere()); selectionBox.updateModelBound(); selectionBox.setRenderState(Box.defaultStateList[RenderState. RS_LIGHT]); selectionBox.setLightCombineMode(LightState.REPLACE);  node1 = new Node("Node 1"); box1 = new Box("Box 1", min, max); node1.attachChild(box1); node1.setLocalTranslation(new Vector3f(0, 30, 0)); selectedNode = node1; box1.setModelBound(new BoundingSphere()); box1.updateModelBound();  node2 = new Node("Node 2"); box2 = new Box("Box 2", min, max); node2.attachChild(box2); node1.attachChild(node2); node2.setLocalTranslation(new Vector3f( -20, -20, 0)); box2.setModelBound(new BoundingSphere()); box2.updateModelBound();  node3 = new Node("Node 3"); box3 = new Box("Box 3", min, max); node3.attachChild(box3); node1.attachChild(node3); node3.setLocalTranslation(new Vector3f(20, -20, 0)); box3.setModelBound(new BoundingSphere()); box3.updateModelBound();  node4 = new Node("Node 4"); box4 = new Box("Box 4", min, max); node4.attachChild(box4); node2.attachChild(node4); node4.setLocalTranslation(new Vector3f( -20, -20, 0)); box4.setModelBound(new BoundingSphere()); box4.updateModelBound();  node5 = new Node("Node 5"); box5 = new Box("Box 5", min, max); node5.attachChild(box5); node2.attachChild(node5); node5.setLocalTranslation(new Vector3f(20, -20, 0)); box5.setModelBound(new BoundingSphere()); box5.updateModelBound();  node6 = new Node("Node 6"); box6 = new Box("Box 6", min, max); node6.attachChild(box6); node3.attachChild(node6); node6.setLocalTranslation(new Vector3f(0, -20, 0)); box6.setModelBound(new BoundingSphere()); box6.updateModelBound();  Vector3f[] lines = {node1.getWorldTranslation(), node2.getWorldTranslation(), node1.getWorldTranslation(), node3.getWorldTranslation(), node2.getWorldTranslation(), node4.getWorldTranslation(), node2.getWorldTranslation(), node5.getWorldTranslation(), node3.getWorldTranslation(), node6.getWorldTranslation()}; Line line = new Line("Connection", lines, null, null, null); line.setRenderState(Line.defaultStateList[RenderState.RS_LIGHT]); line.setLightCombineMode(LightState.REPLACE);  ts = display.getRenderer().getTextureState(); ts.setEnabled(true); Texture t1 = TextureManager.loadTexture( TestBoxColor.class.getClassLoader().getResource( "jmetest/data/images/Monkey.jpg"), Texture.MM_LINEAR, Texture.FM_LINEAR, true); ts.setTexture(t1);  ts2 = display.getRenderer().getTextureState(); ts2.setEnabled(true); Texture t2 = TextureManager.loadTexture( TestBoxColor.class.getClassLoader().getResource( "jmetest/data/texture/dirt.jpg"), Texture.MM_LINEAR, Texture.FM_LINEAR, true); ts2.setTexture(t2);  ts3 = display.getRenderer().getTextureState(); ts3.setEnabled(true); Texture t3 = TextureManager.loadTexture( TestBoxColor.class.getClassLoader().getResource( "jmetest/data/texture/snowflake.png"), Texture.MM_LINEAR, Texture.FM_LINEAR, true); ts3.setTexture(t3);  node1.setRenderState(ts);  scene.attachChild(node1); rootNode.attachChild(line); rootNode.attachChild(scene); scene.attachChild(selectionBox); cam.update(); scene.updateGeometricState(0.0f, true); rootNode.updateRenderState();  nc1 = new NodeHandler(this, node1, "LWJGL"); nc2 = new NodeHandler(this, node2, "LWJGL"); nc3 = new NodeHandler(this, node3, "LWJGL"); nc4 = new NodeHandler(this, node4, "LWJGL"); nc5 = new NodeHandler(this, node5, "LWJGL"); nc6 = new NodeHandler(this, node6, "LWJGL"); nc1.setKeySpeed(5); nc1.setMouseSpeed(1); nc2.setKeySpeed(5); nc2.setMouseSpeed(1); nc3.setKeySpeed(5); nc3.setMouseSpeed(1); nc4.setKeySpeed(5); nc4.setMouseSpeed(1); nc5.setKeySpeed(5); nc5.setMouseSpeed(1); nc6.setKeySpeed(5); nc6.setMouseSpeed(1);  input = nc1;  KeyBindingManager keyboard = KeyBindingManager.getKeyBindingManager(); keyboard.set("node1", KeyInput.KEY_1); keyboard.set("node2", KeyInput.KEY_2); keyboard.set("node3", KeyInput.KEY_3); keyboard.set("node4", KeyInput.KEY_4); keyboard.set("node5", KeyInput.KEY_5); keyboard.set("node6", KeyInput.KEY_6); TestNodeSelectionAction s1 = new TestNodeSelectionAction(this, 1); s1.setKey("node1"); nc1.addAction(s1); nc2.addAction(s1); nc3.addAction(s1); nc4.addAction(s1); nc5.addAction(s1); nc6.addAction(s1); TestNodeSelectionAction s2 = new TestNodeSelectionAction(this, 2); s2.setKey("node2"); nc1.addAction(s2); nc2.addAction(s2); nc3.addAction(s2); nc4.addAction(s2); nc5.addAction(s2); nc6.addAction(s2); TestNodeSelectionAction s3 = new TestNodeSelectionAction(this, 3); s3.setKey("node3"); nc1.addAction(s3); nc2.addAction(s3); nc3.addAction(s3); nc4.addAction(s3); nc5.addAction(s3); nc6.addAction(s3); TestNodeSelectionAction s4 = new TestNodeSelectionAction(this, 4); s4.setKey("node4"); nc1.addAction(s4); nc2.addAction(s4); nc3.addAction(s4); nc4.addAction(s4); nc5.addAction(s4); nc6.addAction(s4); TestNodeSelectionAction s5 = new TestNodeSelectionAction(this, 5); s5.setKey("node5"); nc1.addAction(s5); nc2.addAction(s5); nc3.addAction(s5); nc4.addAction(s5); nc5.addAction(s5); nc6.addAction(s5); TestNodeSelectionAction s6 = new TestNodeSelectionAction(this, 6); s6.setKey("node6"); nc1.addAction(s6); nc2.addAction(s6); nc3.addAction(s6); nc4.addAction(s6); nc5.addAction(s6); nc6.addAction(s6);  }
Vector3f loc = new Vector3f(0.0f, 0.0f, -100.0f); Vector3f left = new Vector3f(1.0f, 0.0f, 0.0f); Vector3f up = new Vector3f(0.0f, 1.0f, 0.0f); Vector3f dir = new Vector3f(0.0f, 0f, 1.0f); cam.setFrame(loc, left, up, dir); cam.update();  display.setTitle("Test Scene Graph");  lightState.setEnabled(false);  key = InputSystem.getKeyInput(); KeyBindingManager.getKeyBindingManager().setKeyInput(key);  KeyBindingManager.getKeyBindingManager().set("notex", KeyInput.KEY_7);  KeyBindingManager.getKeyBindingManager().set("tex1", KeyInput.KEY_8);  KeyBindingManager.getKeyBindingManager().set("tex2", KeyInput.KEY_9);  KeyBindingManager.getKeyBindingManager().set("tex3", KeyInput.KEY_0);  KeyBindingManager.getKeyBindingManager().set("tog_bounds", KeyInput.KEY_B);  Vector3f min = new Vector3f(-5, -5, -5); Vector3f max = new Vector3f(5, 5, 5); AlphaState as1 = display.getRenderer().getAlphaState(); as1.setBlendEnabled(true); as1.setSrcFunction(AlphaState.SB_SRC_ALPHA); as1.setDstFunction(AlphaState.DB_ONE); as1.setTestEnabled(true); as1.setTestFunction(AlphaState.TF_GREATER); as1.setEnabled(true);  DirectionalLight dr = new DirectionalLight(); dr.setDiffuse(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f)); dr.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f)); dr.setDirection(new Vector3f(0, 0, 150)); dr.setEnabled(true); lightState.detachAll(); lightState.attach(dr);  text = new Text("Selected Node", "Selected Node: Node 1"); text.setLocalTranslation(new Vector3f(0, 20, 0)); fpsNode.attachChild(text);  scene = new Node("3D Scene Node");  CullState cs = display.getRenderer().getCullState(); cs.setCullMode(CullState.CS_BACK); cs.setEnabled(true); rootNode.setRenderState(cs);  selectionBox = new Box("Selection", min.mult(1.25f), max.mult(1.25f)); selectionBox.setSolidColor(new ColorRGBA(0, 1, 0, 0.5f)); selectionBox.setRenderState(as1); selectionBox.setModelBound(new BoundingSphere()); selectionBox.updateModelBound(); selectionBox.setRenderState(Box.defaultStateList[RenderState.RS_LIGHT]); selectionBox.setLightCombineMode(LightState.REPLACE);  node1 = new Node("Node 1"); box1 = new Box("Box 1", min, max); node1.attachChild(box1); node1.setLocalTranslation(new Vector3f(0, 30, 0)); selectedNode = node1; box1.setModelBound(new BoundingSphere()); box1.updateModelBound();  node2 = new Node("Node 2"); box2 = new Box("Box 2", min, max); node2.attachChild(box2); node1.attachChild(node2); node2.setLocalTranslation(new Vector3f(-20, -20, 0)); box2.setModelBound(new BoundingSphere()); box2.updateModelBound();  node3 = new Node("Node 3"); box3 = new Box("Box 3", min, max); node3.attachChild(box3); node1.attachChild(node3); node3.setLocalTranslation(new Vector3f(20, -20, 0)); box3.setModelBound(new BoundingSphere()); box3.updateModelBound();  node4 = new Node("Node 4"); box4 = new Box("Box 4", min, max); node4.attachChild(box4); node2.attachChild(node4); node4.setLocalTranslation(new Vector3f(-20, -20, 0)); box4.setModelBound(new BoundingSphere()); box4.updateModelBound();  node5 = new Node("Node 5"); box5 = new Box("Box 5", min, max); node5.attachChild(box5); node2.attachChild(node5); node5.setLocalTranslation(new Vector3f(20, -20, 0)); box5.setModelBound(new BoundingSphere()); box5.updateModelBound();  node6 = new Node("Node 6"); box6 = new Box("Box 6", min, max); node6.attachChild(box6); node3.attachChild(node6); node6.setLocalTranslation(new Vector3f(0, -20, 0)); box6.setModelBound(new BoundingSphere()); box6.updateModelBound();  Vector3f[] lines = { node1.getWorldTranslation(), node2.getWorldTranslation(), node1.getWorldTranslation(), node3.getWorldTranslation(), node2.getWorldTranslation(), node4.getWorldTranslation(), node2.getWorldTranslation(), node5.getWorldTranslation(), node3.getWorldTranslation(), node6.getWorldTranslation()}; Line line = new Line("Connection", lines, null, null, null); line.setRenderState(Line.defaultStateList[RenderState.RS_LIGHT]); line.setLightCombineMode(LightState.REPLACE);  ts = display.getRenderer().getTextureState(); ts.setEnabled(true); Texture t1 = TextureManager.loadTexture( TestScenegraph.class.getClassLoader().getResource( "jmetest/data/images/Monkey.jpg"), Texture.MM_LINEAR, Texture.FM_LINEAR, true); ts.setTexture(t1);  ts2 = display.getRenderer().getTextureState(); ts2.setEnabled(true); Texture t2 = TextureManager.loadTexture(TestScenegraph.class .getClassLoader().getResource("jmetest/data/texture/dirt.jpg"), Texture.MM_LINEAR, Texture.FM_LINEAR, true); ts2.setTexture(t2);  ts3 = display.getRenderer().getTextureState(); ts3.setEnabled(true); Texture t3 = TextureManager.loadTexture(TestScenegraph.class .getClassLoader().getResource( "jmetest/data/texture/snowflake.png"), Texture.MM_LINEAR, Texture.FM_LINEAR, true); ts3.setTexture(t3);  node1.setRenderState(ts);  scene.attachChild(node1); rootNode.attachChild(line); rootNode.attachChild(scene); scene.attachChild(selectionBox); cam.update(); scene.updateGeometricState(0.0f, true); rootNode.updateRenderState();  nc1 = new NodeHandler(this, node1, "LWJGL"); nc2 = new NodeHandler(this, node2, "LWJGL"); nc3 = new NodeHandler(this, node3, "LWJGL"); nc4 = new NodeHandler(this, node4, "LWJGL"); nc5 = new NodeHandler(this, node5, "LWJGL"); nc6 = new NodeHandler(this, node6, "LWJGL"); nc1.setKeySpeed(5); nc1.setMouseSpeed(1); nc2.setKeySpeed(5); nc2.setMouseSpeed(1); nc3.setKeySpeed(5); nc3.setMouseSpeed(1); nc4.setKeySpeed(5); nc4.setMouseSpeed(1); nc5.setKeySpeed(5); nc5.setMouseSpeed(1); nc6.setKeySpeed(5); nc6.setMouseSpeed(1);  input = nc1;  KeyBindingManager keyboard = KeyBindingManager.getKeyBindingManager(); keyboard.set("node1", KeyInput.KEY_1); keyboard.set("node2", KeyInput.KEY_2); keyboard.set("node3", KeyInput.KEY_3); keyboard.set("node4", KeyInput.KEY_4); keyboard.set("node5", KeyInput.KEY_5); keyboard.set("node6", KeyInput.KEY_6); TestNodeSelectionAction s1 = new TestNodeSelectionAction(this, 1); s1.setKey("node1"); nc1.addAction(s1); nc2.addAction(s1); nc3.addAction(s1); nc4.addAction(s1); nc5.addAction(s1); nc6.addAction(s1); TestNodeSelectionAction s2 = new TestNodeSelectionAction(this, 2); s2.setKey("node2"); nc1.addAction(s2); nc2.addAction(s2); nc3.addAction(s2); nc4.addAction(s2); nc5.addAction(s2); nc6.addAction(s2); TestNodeSelectionAction s3 = new TestNodeSelectionAction(this, 3); s3.setKey("node3"); nc1.addAction(s3); nc2.addAction(s3); nc3.addAction(s3); nc4.addAction(s3); nc5.addAction(s3); nc6.addAction(s3); TestNodeSelectionAction s4 = new TestNodeSelectionAction(this, 4); s4.setKey("node4"); nc1.addAction(s4); nc2.addAction(s4); nc3.addAction(s4); nc4.addAction(s4); nc5.addAction(s4); nc6.addAction(s4); TestNodeSelectionAction s5 = new TestNodeSelectionAction(this, 5); s5.setKey("node5"); nc1.addAction(s5); nc2.addAction(s5); nc3.addAction(s5); nc4.addAction(s5); nc5.addAction(s5); nc6.addAction(s5); TestNodeSelectionAction s6 = new TestNodeSelectionAction(this, 6); s6.setKey("node6"); nc1.addAction(s6); nc2.addAction(s6); nc3.addAction(s6); nc4.addAction(s6); nc5.addAction(s6); nc6.addAction(s6);  }
  protected void simpleInitGame() {    Vector3f loc = new Vector3f(0.0f, 0.0f, -100.0f);    Vector3f left = new Vector3f(1.0f, 0.0f, 0.0f);    Vector3f up = new Vector3f(0.0f, 1.0f, 0.0f);    Vector3f dir = new Vector3f(0.0f, 0f, 1.0f);    cam.setFrame(loc, left, up, dir);    cam.update();    display.setTitle("Test Scene Graph");    lightState.setEnabled(false);    key = InputSystem.getKeyInput();    KeyBindingManager.getKeyBindingManager().setKeyInput(key);    KeyBindingManager.getKeyBindingManager().set(        "notex",        KeyInput.KEY_7);    KeyBindingManager.getKeyBindingManager().set(        "tex1",        KeyInput.KEY_8);    KeyBindingManager.getKeyBindingManager().set(        "tex2",        KeyInput.KEY_9);    KeyBindingManager.getKeyBindingManager().set(        "tex3",        KeyInput.KEY_0);    KeyBindingManager.getKeyBindingManager().set(        "tog_bounds",        KeyInput.KEY_B);    Vector3f min = new Vector3f( -5, -5, -5);    Vector3f max = new Vector3f(5, 5, 5);    AlphaState as1 = display.getRenderer().getAlphaState();    as1.setBlendEnabled(true);    as1.setSrcFunction(AlphaState.SB_SRC_ALPHA);    as1.setDstFunction(AlphaState.DB_ONE);    as1.setTestEnabled(true);    as1.setTestFunction(AlphaState.TF_GREATER);    as1.setEnabled(true);    DirectionalLight dr = new DirectionalLight();    dr.setDiffuse(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));    dr.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f));    dr.setDirection(new Vector3f(0, 0, 150));    dr.setEnabled(true);    lightState.detachAll();    lightState.attach(dr);    text = new Text("Selected Node", "Selected Node: Node 1");    text.setLocalTranslation(new Vector3f(0, 20, 0));    fpsNode.attachChild(text);    scene = new Node("3D Scene Node");    CullState cs = display.getRenderer().getCullState();    cs.setCullMode(CullState.CS_BACK);    cs.setEnabled(true);    rootNode.setRenderState(cs);    selectionBox = new Box("Selection", min.mult(1.25f), max.mult(1.25f));    selectionBox.setSolidColor(new ColorRGBA(0, 1, 0, 0.5f));    selectionBox.setRenderState(as1);    selectionBox.setModelBound(new BoundingSphere());    selectionBox.updateModelBound();    selectionBox.setRenderState(Box.defaultStateList[RenderState.                                RS_LIGHT]);    selectionBox.setLightCombineMode(LightState.REPLACE);    node1 = new Node("Node 1");    box1 = new Box("Box 1", min, max);    node1.attachChild(box1);    node1.setLocalTranslation(new Vector3f(0, 30, 0));    selectedNode = node1;    box1.setModelBound(new BoundingSphere());    box1.updateModelBound();    node2 = new Node("Node 2");    box2 = new Box("Box 2", min, max);    node2.attachChild(box2);    node1.attachChild(node2);    node2.setLocalTranslation(new Vector3f( -20, -20, 0));    box2.setModelBound(new BoundingSphere());    box2.updateModelBound();    node3 = new Node("Node 3");    box3 = new Box("Box 3", min, max);    node3.attachChild(box3);    node1.attachChild(node3);    node3.setLocalTranslation(new Vector3f(20, -20, 0));    box3.setModelBound(new BoundingSphere());    box3.updateModelBound();    node4 = new Node("Node 4");    box4 = new Box("Box 4", min, max);    node4.attachChild(box4);    node2.attachChild(node4);    node4.setLocalTranslation(new Vector3f( -20, -20, 0));    box4.setModelBound(new BoundingSphere());    box4.updateModelBound();    node5 = new Node("Node 5");    box5 = new Box("Box 5", min, max);    node5.attachChild(box5);    node2.attachChild(node5);    node5.setLocalTranslation(new Vector3f(20, -20, 0));    box5.setModelBound(new BoundingSphere());    box5.updateModelBound();    node6 = new Node("Node 6");    box6 = new Box("Box 6", min, max);    node6.attachChild(box6);    node3.attachChild(node6);    node6.setLocalTranslation(new Vector3f(0, -20, 0));    box6.setModelBound(new BoundingSphere());    box6.updateModelBound();    Vector3f[] lines = {node1.getWorldTranslation(), node2.getWorldTranslation(),        node1.getWorldTranslation(), node3.getWorldTranslation(),        node2.getWorldTranslation(), node4.getWorldTranslation(),        node2.getWorldTranslation(), node5.getWorldTranslation(),        node3.getWorldTranslation(), node6.getWorldTranslation()};    Line line = new Line("Connection", lines, null, null, null);    line.setRenderState(Line.defaultStateList[RenderState.RS_LIGHT]);    line.setLightCombineMode(LightState.REPLACE);    ts = display.getRenderer().getTextureState();    ts.setEnabled(true);    Texture t1 = TextureManager.loadTexture(        TestBoxColor.class.getClassLoader().getResource(        "jmetest/data/images/Monkey.jpg"),        Texture.MM_LINEAR,        Texture.FM_LINEAR,        true);    ts.setTexture(t1);    ts2 = display.getRenderer().getTextureState();    ts2.setEnabled(true);    Texture t2 = TextureManager.loadTexture(        TestBoxColor.class.getClassLoader().getResource(        "jmetest/data/texture/dirt.jpg"),        Texture.MM_LINEAR,        Texture.FM_LINEAR,        true);    ts2.setTexture(t2);    ts3 = display.getRenderer().getTextureState();    ts3.setEnabled(true);    Texture t3 = TextureManager.loadTexture(        TestBoxColor.class.getClassLoader().getResource(        "jmetest/data/texture/snowflake.png"),        Texture.MM_LINEAR,        Texture.FM_LINEAR,        true);    ts3.setTexture(t3);    node1.setRenderState(ts);    scene.attachChild(node1);    rootNode.attachChild(line);    rootNode.attachChild(scene);    scene.attachChild(selectionBox);    cam.update();    scene.updateGeometricState(0.0f, true);    rootNode.updateRenderState();    nc1 = new NodeHandler(this, node1, "LWJGL");    nc2 = new NodeHandler(this, node2, "LWJGL");    nc3 = new NodeHandler(this, node3, "LWJGL");    nc4 = new NodeHandler(this, node4, "LWJGL");    nc5 = new NodeHandler(this, node5, "LWJGL");    nc6 = new NodeHandler(this, node6, "LWJGL");    nc1.setKeySpeed(5);    nc1.setMouseSpeed(1);    nc2.setKeySpeed(5);    nc2.setMouseSpeed(1);    nc3.setKeySpeed(5);    nc3.setMouseSpeed(1);    nc4.setKeySpeed(5);    nc4.setMouseSpeed(1);    nc5.setKeySpeed(5);    nc5.setMouseSpeed(1);    nc6.setKeySpeed(5);    nc6.setMouseSpeed(1);    input = nc1;    KeyBindingManager keyboard = KeyBindingManager.getKeyBindingManager();    keyboard.set("node1", KeyInput.KEY_1);    keyboard.set("node2", KeyInput.KEY_2);    keyboard.set("node3", KeyInput.KEY_3);    keyboard.set("node4", KeyInput.KEY_4);    keyboard.set("node5", KeyInput.KEY_5);    keyboard.set("node6", KeyInput.KEY_6);    TestNodeSelectionAction s1 = new TestNodeSelectionAction(this, 1);    s1.setKey("node1");    nc1.addAction(s1);    nc2.addAction(s1);    nc3.addAction(s1);    nc4.addAction(s1);    nc5.addAction(s1);    nc6.addAction(s1);    TestNodeSelectionAction s2 = new TestNodeSelectionAction(this, 2);    s2.setKey("node2");    nc1.addAction(s2);    nc2.addAction(s2);    nc3.addAction(s2);    nc4.addAction(s2);    nc5.addAction(s2);    nc6.addAction(s2);    TestNodeSelectionAction s3 = new TestNodeSelectionAction(this, 3);    s3.setKey("node3");    nc1.addAction(s3);    nc2.addAction(s3);    nc3.addAction(s3);    nc4.addAction(s3);    nc5.addAction(s3);    nc6.addAction(s3);    TestNodeSelectionAction s4 = new TestNodeSelectionAction(this, 4);    s4.setKey("node4");    nc1.addAction(s4);    nc2.addAction(s4);    nc3.addAction(s4);    nc4.addAction(s4);    nc5.addAction(s4);    nc6.addAction(s4);    TestNodeSelectionAction s5 = new TestNodeSelectionAction(this, 5);    s5.setKey("node5");    nc1.addAction(s5);    nc2.addAction(s5);    nc3.addAction(s5);    nc4.addAction(s5);    nc5.addAction(s5);    nc6.addAction(s5);    TestNodeSelectionAction s6 = new TestNodeSelectionAction(this, 6);    s6.setKey("node6");    nc1.addAction(s6);    nc2.addAction(s6);    nc3.addAction(s6);    nc4.addAction(s6);    nc5.addAction(s6);    nc6.addAction(s6);  }