public Shape AttachShape(IVertex v) { if (v == null) { throw new ArgumentNullException("v"); } if (!this.VisitedGraph.ContainsVertex(v)) { throw new ArgumentException("vertex is not part of the graph"); } if (this.vertexShapes.Contains(v)) { throw new ArgumentException("shape already associtated with this vertex"); } Shape shape = this.ShapeProvider.ProvideShape(v); this.Panel.Insert(shape); Modify m = new Modify(); m.AddInsertShape(shape, this.Panel.AbstractShape); this.Panel.AbstractShape.History.Do(m); Connect(v, shape); return(shape); }
public Shape AttachShape(IVertex v) { if (v==null) throw new ArgumentNullException("v"); if (!this.VisitedGraph.ContainsVertex(v)) throw new ArgumentException("vertex is not part of the graph"); if (this.vertexShapes.Contains(v)) throw new ArgumentException("shape already associtated with this vertex"); Shape shape = this.ShapeProvider.ProvideShape(v); this.Panel.Insert(shape); Modify m = new Modify(); m.AddInsertShape(shape,this.Panel.AbstractShape); this.Panel.AbstractShape.History.Do(m); Connect(v,shape); return shape; }