/** * <code>test192Op</code> dummy impl. * * @return an <code>boolean</code> value depending upon the result of the interceptors. true for * local; false for not local. */ public boolean test192Op() { boolean result = false; try { Current current = (Current) orb.resolve_initial_references("PICurrent"); Any anyName = current.get_slot(SInitializer.slotID); result = anyName.extract_boolean(); } catch (InvalidSlot e) { e.printStackTrace(); throw new INTERNAL(e.toString()); } catch (InvalidName e) { e.printStackTrace(); throw new INTERNAL(e.toString()); } return result; }
public TreeFrame() { frame = new JFrame("NSLookup"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); try { root = TreeFactory.createORBTree("localhost", "1234", root); } catch (InvalidName e) { System.out.println("No connection :( "); e.printStackTrace(); } ; DefaultTreeModel model = new DefaultTreeModel(root); // tree = new JTree(model); tree = new DNDTree(model); /* tree.addTreeSelectionListener(new TreeSelectionListener(){ public void valueChanged(TreeSelectionEvent e) { NamingContextTreeNode node = (NamingContextTreeNode)tree.getSelectionPath().getLastPathComponent(); System.out.println(node.getType()); } }); */ frame.getContentPane().add(tree); frame.setSize(400, 400); frame.show(); }