addEdge() public method

public addEdge ( UMD.HCIL.Piccolo.Nodes.PPath p ) : void
p UMD.HCIL.Piccolo.Nodes.PPath
return void
示例#1
0
 public void CreateConnections(ref List <DlgObj> objects)
 {
     for (int i = 0; i < Outlinks.Count; i++)
     {
         for (int j = 0; j < objects.Count; j++)
         {
             if (objects[j].Id == Outlinks[i].Link)
             {
                 PPath  p1   = Outlinks[i].node;
                 DlgObj p2   = (DlgObj)dv.nodeLayer[j];
                 PPath  edge = new PPath();
                 if (p1.Tag == null)
                 {
                     p1.Tag = new ArrayList();
                 }
                 if (p2.Tag == null)
                 {
                     p2.Tag = new ArrayList();
                 }
                 ((ArrayList)p1.Tag).Add(edge);
                 ((ArrayList)p2.Tag).Add(edge);
                 edge.Tag = new ArrayList();
                 ((ArrayList)edge.Tag).Add(p1);
                 ((ArrayList)edge.Tag).Add(p2);
                 dv.addEdge(edge);
             }
         }
     }
 }