private void makeNewLinks(){
      
      ShapeNode retrievedShape = null;
       ArrayList myList = new ArrayList();
       String kind = null;
       myList.addAll(this.nodes);
      
       ShapeNode parent=new ShapeNode();
       ShapeNode child = new ShapeNode();
    
      // parent.setKind(node_type.LINK_NODE);
      // chld.setKind(node_type.LINK_NODE);
     
       try{
        
      for(Object myShape : myList){
            
            
            retrievedShape = (ShapeNode)myShape;
            kind=retrievedShape.node.getKind().toString();
                    
                  
       if(kind.equals(node_type.LINK_NODE.toString()) && !retrievedShape.label.equalsIgnoreCase("Delay")){
            Node node = new Node();
            node.setKind(node_type.LINK_NODE);
            LinkNode newLink = new LinkNode(this,node);
           String parentLabel = ((LinkNode)retrievedShape).parent.node.label.replaceAll("\\d+", "1");
           String chldLabel = ((LinkNode)retrievedShape).child.node.label.replaceAll("\\d+", "1");
           newLink.parent = getNodeByLabel(parentLabel);
           newLink.child =getNodeByLabel(chldLabel);
           newLink.makeLink(newLink.parent, newLink.child);  
           newLink.label = "LinkLabel";
           newLink.node.label="LinkLabel";
           nodes.add(newLink);
           this.myContentPane.add(newLink);
          
      }            
      else if(kind.equals(node_type.MODEL_LINK_NODE.toString()) && !retrievedShape.label.equalsIgnoreCase("Delay")){
            Node node = new Node();
            node.setKind(node_type.MODEL_LINK_NODE);
            ModelLinkNode newLink = new ModelLinkNode(this,node);
            String parentLabel = ((ModelLinkNode)retrievedShape).parent.node.label.replaceAll("\\d+", "1");
            String chldLabel = ((ModelLinkNode)retrievedShape).child.node.label.replaceAll("\\d+", "1");
            newLink.parent = getNodeByLabel(parentLabel);
            newLink.child =getNodeByLabel(chldLabel);
            newLink.makeLink(newLink.parent, newLink.child);  
            newLink.label = "ModelLinkLabel";
            newLink.node.label="ModelLinkLabel";
            newLink.parent.ModelLinkChildLinkNode = newLink;
            nodes.add(newLink);
            this.myContentPane.add(newLink);
          
      }
       else if(kind.equals(node_type.LINK_NODE.toString()) && retrievedShape.label.equalsIgnoreCase("Delay")){
            this.nodes.remove(retrievedShape);
            this.myContentPane.remove(retrievedShape);
       }
                   
                   
    }
      makeTemporalLinks();
       }catch(Exception ex){ex.printStackTrace();}
      
  }