if (edge == null) {
GraphicNode n1 = (GraphicNode) styleGroups.getNode(from);
GraphicNode n2 = (GraphicNode) styleGroups.getNode(to);
if (n1 == null)
throw new ElementNotFoundException("node \"%s\"", from);
if (n2 == null)
throw new ElementNotFoundException("node \"%s\"", to);
edge = new GraphicEdge(id, n1, n2, directed, null);// , attributes);
styleGroups.addElement(edge);