protected static String getType(Class<?> clazz) { if (classMap.containsValue(clazz)) { return classMap.getKey(clazz); } else { return clazz.getCanonicalName().toString(); } }
throw new SAXNotSupportedException("edge attribute list missing " + "'source': " + atts.toString()); V source = vertex_ids.getKey(source_id); if (source == null) throw new SAXNotSupportedException("specified 'source' attribute " + throw new SAXNotSupportedException("edge attribute list missing " + "'target': " + atts.toString()); V target = vertex_ids.getKey(target_id); if (target == null) throw new SAXNotSupportedException("specified 'target' attribute " +
tag_state.getKey(current_states.getFirst()) + ", closed " + tag);
public void transformChanged(int type, TransformGroup tg) { if(tg == null) return; Transform3D t3d = new Transform3D(); tg.getTransform(t3d); // System.err.println(tg+" transformChanged \n"+t3d); Point3f p1 = new Point3f(); V v = vertexMap.getKey(tg); // Transform3D lvw = new Transform3D(); // tg.getLocalToVworld(lvw); // System.err.println("lvw = \n"+lvw); // lvw.invert(); // System.err.println("invert lvw = \n"+lvw); Point3f p0 = layout.transform(v); // Transform3D vwip = new Transform3D(); // canvas.getVworldToImagePlate(vwip); // System.err.println("vwip=\n"+vwip); // t3d.mul(lvw); t3d.transform(p1); // scale.transform(p1); System.err.println("change location for vertex "+v+", transformGroup "+tg+" from "+p0+" to "+p1); // p1.set(p1.getX()*2,p1.getY()*2,p1.getZ()*2); // layout.setLocation(v, p1); }});
@SuppressWarnings("unchecked") protected void createVertex(Attributes atts) throws SAXNotSupportedException { Map<String, String> vertex_atts = getAttributeMap(atts); String id = vertex_atts.remove("id"); if (id == null) throw new SAXNotSupportedException("node attribute list missing " + "'id': " + atts.toString()); V v = vertex_ids.getKey(id); if (v == null) { if (vertex_factory != null) v = vertex_factory.create(); else v = (V)id; vertex_ids.put(v, id); this.current_graph.addVertex(v); // put remaining attribute/value pairs in vertex_data addExtraData(vertex_atts, vertex_metadata, v); } else throw new SAXNotSupportedException("Node id \"" + id + " is a duplicate of an existing node ID"); this.current_vertex = v; }
if (node == null) throw new SAXNotSupportedException("Endpoint must include an 'id' attribute"); V v = vertex_ids.getKey(node); if (v == null) throw new SAXNotSupportedException("Endpoint refers to nonexistent node ID: " + node);