Hi Sean, Thanks for a good directing. That's really flexible. Regards Lawrence On Wed, 11 Nov 2009 08:30:07 +0100, Sean Luke <[log in to unmask]> wrote: >Sure! > >On the CVS repository (I'm not sure if they made it into the latest >tarball, they may have, you can check) there are TWO applications >which allow dragging with the mouse: > > HeatBugs > NetworkTest > >There's also a How-To which points to them. Check out their code to >get an idea how to do it. Keep in mind that the code that I wrote >there updates the node's position in its field; but if you're also >storing its position inside the node itself (say for purposes of >efficiency) you'll need to modify the code to update that as well. > >Sean > >On Nov 11, 2009, at 5:12 AM, Lawrence Tsang wrote: > >> Hi, >> >> While testing and studying the Network Model in Mason Tutorial >> 5, I >> find that although the "SimplePortrayal2D" class could be extended >> to draw >> the Network Nodes in a "ContinuousPortrayal2D" Field, the Nodes seem >> not >> to be movable by mouse drag when the model is being paused. >> >> Is there a way to modify Tutorial 5 so that, when the model is >> being >> paused, I could drag a Node to move it around while the Node's edges >> would >> redraw themselves to reflect the Node's updated location ? >> >> Thanks for any suggestion. >> >> Regards >> Lawrence Tsang