System.out.println("Putting:" + newkey);
    public void run(ItemRegistry registry, double frac) {        System.out.println("Running SmartCircleLayout");        Graph g = registry.getFilteredGraph();        Rectangle2D r = super.getLayoutBounds(registry);        double height = r.getHeight();        double width = r.getWidth();        double cx = r.getCenterX();        double cy = r.getCenterY();        // set radius        double radius = m_radius;        if (radius <= 0) {            radius = 0.45 * (height < width ? height : width);        }        Collection nodes;        SortedMap sm = new TreeMap();        Iterator nodeIter = g.getNodes();        // If SortType Alphabetical, do it        if(sortType.equals(LayoutPlugin.STR_SORT_ALPHABETICAL)) {            System.out.println(" - doing Alphabetical");			for (int i=0; nodeIter.hasNext(); i++) {			    NodeItem n = (NodeItem)nodeIter.next();			    PNode pn = (PNode) n.getEntity();			    String name = pn.v().toString();			    			    sm.put(name, n);			}        }        // otherwise its a measured sort        else {// if SNA is loaded//        if (_pluginRef != null) {            System.out.println(" - doing " + sortType);            for (int i = 0; nodeIter.hasNext(); i++) {                NodeItem n = (NodeItem) nodeIter.next();                PElement p = (PElement) n.getEntity();                nv2d.graph.GraphElement geData = p.getNV2DGraphElement();                Iterator iter = geData.getVisibleDatumSet().iterator();                System.out.println("Node: " + geData.displayId());                while(iter.hasNext()) {                    Datum d = (Datum)iter.next();                    if(sortType.equals(d.name())) {                        Double key = (Double)d.get();                        if(!sm.containsKey(key)) {                            System.out.println("Putting: " + key);                            sm.put(key, n);                        }                        else {                            Double newkey = new Double(key.doubleValue() + ((double)i) * 10E-8);                            System.out.println("Putting:" + newkey);                            sm.put(newkey, n);                        }                    }                }            }        }                //        System.out.println(" - doing " + sortType);//        for (int i = 0; nodeIter.hasNext(); i++) {//            NodeItem n = (NodeItem) nodeIter.next();//            PElement p = (PElement) n.getEntity();//            nv2d.graph.GraphElement geData = p.getNV2DGraphElement();//            Iterator iter = geData.getDatumSet().iterator();//            System.out.println("Node: " + geData.displayId());//            while(iter.hasNext()) {//                Datum d = (Datum)iter.next();//                if(sortType.equals(d.name())) {//                    String key = d.get().toString();//                    // TODO - fix this evil!//                    // need to compare the actual values//                    if(!sm.containsKey(key)) {//                        System.out.println("Putting: " + key);//                        sm.put(key, n);//                    }//                    else {//                        System.out.println("Putting:" + key+Integer.toString(i));//                        sm.put(key+Integer.toString(i), n);//                    }//                }//            }//        }//    }//                        nodes = sm.values();        // Place nodes in Circle Formation        int nn = g.getNodeCount();        Iterator nIter = nodes.iterator();        for (int i = 0; nIter.hasNext(); i++) {            NodeItem n = (NodeItem) nIter.next();            System.out.println("drawNode: " + n.getAttribute("id") + " i:" + i);            // Start on the lefthand side and move around            double angle = ((2 * Math.PI * i - 1) / nn) + Math.PI;            double x = Math.cos(angle) * radius + cx;            double y = Math.sin(angle) * radius + cy;            this.setLocation(n, null, x, y);        }    } // run