[platform-dev] Looking for VMDGraphScene Reconnect example

  • From: "Birdasaur" < >
  • To:
  • Subject: [platform-dev] Looking for VMDGraphScene Reconnect example
  • Date: Fri, 28 Sep 2012 16:39:11 -0400

Hello everyone.  I've started working on a Visual Library project, learning 
as I go.  I've added nodes, pins and edges with no problem using the 
VMDGraphScene set.  I would like to allow the user to manually reconnect 
edges between pins but I can't seem to get the action system to do this.  

Could someone point me to an example that accomplishes this AND uses the 
VMDGraphScene type scene?  I tried to adapt some of the existing connection 
examples in the Visual Examples collection but without success.  Possibly 
because there is a different way with VMDGraphScene??

Below is the code I use to add nodes, pins and edges:


Code:

        //add the nodes
        VMDNodeWidget n1 = (VMDNodeWidget)scene.addNode("Node 1");
        n1.setNodeName("Node 1");
        VMDNodeWidget n2 = (VMDNodeWidget)scene.addNode("Node 2");
        n2.setNodeName("Node 2");
        
        //Add pins to the nodes
        VMDPinWidget p1 = (VMDPinWidget) scene.addPin("Node 1","Pin 1");
        p1.setPinName("Pin 1");
        VMDPinWidget p2 = (VMDPinWidget) scene.addPin("Node 2","Pin 2");
        p2.setPinName("Pin 2");
        VMDPinWidget p3 = (VMDPinWidget) scene.addPin("Node 2","Pin 3");
        p3.setPinName("Pin 3");

        //Add the Edge
        VMDConnectionWidget edgeWidget = (VMDConnectionWidget) 
scene.addEdge("Edge 1");
        scene.setEdgeSource("Edge 1","Pin 1");
        scene.setEdgeTarget("Edge 1","Pin 2");









[platform-dev] Looking for VMDGraphScene Reconnect example

Birdasaur 09/28/2012

[platform-dev] Looking for VMDGraphScene Reconnect example

Birdasaur 09/30/2012

Project Features

Project Links

About this Project

Platform was started in November 2009, is owned by Antonin Nebuzelsky, and has 138 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close