public IGroupShape draw(IShapeFactory shapeFactory) {
Map<View, IShape> map = new HashMap<View, IShape>();
IGroupShape group = shapeFactory.createGroup();
for (Clazz clazz : classes) {
IShape shape = clazz.createShape(shapeFactory);
map.put(clazz.getNode(), shape);
group.add(shape);
shape.addToPage();
}
for (Edge edge : edges) {
IShape source = map.get(edge.getSource());
IShape target = map.get(edge.getTarget());
IShape shape = edge.createShape(source, target, shapeFactory);
group.add(shape);
}
group.addToPage();