|
From: Jesus M. S. Jr. <jm...@ih...> - 2001-02-01 20:28:36
|
Hi, eh0...@pi... wrote: > > Hi, > > I would like to be able to specify that certain Vertexes must not be > repositioned - they must stay where they are and the others must be positioned > around them. Do you have advice for me on how I should go about coding this into > OpenJGraph? The code to interactively drag a vertex is in GraphPanelNormalState.java, in the salvo.jesus.graph,visual package ( in CVS ) or in salvo.jesus.graph package ( in the 0.7.6 release ). We must therefore have a way for telling that state not to drag the vertex, possibly some property in VisualVertex that GraphPanelNormalState needs to check. Of course, doing this will not prevent programatically changing the position of the vertex. > > Also, I would like to use a layout algorithm that lays out the Vertexes in a > flow layout - form the top left corner of the screen to the bottom right. Which > algorithm is the best for this? Are you saying like that FlowLayout of Swing? Then that's quite simple ( I dont even think it is a graph drawing algorithm ), the resulting layout may also look horrible, specially if there are lots of edges between vertices. Just iterate through the vertices and lay them out as mentioned, specifying the number of cols and rows ( as you would will Flowlayout ). Regards, John > > I haven't read the necessary books on layout algorithms, so I am a bit in the > dark on this. > > Thanks in advance, > > Evert > > --------------------------------------------- > This message was sent using M-Web Airmail. > http://airmail.mweb.co.za/ > > _______________________________________________ > Openjgraph-development mailing list > Ope...@li... > http://lists.sourceforge.net/lists/listinfo/openjgraph-development -- Homepage: http://homepages.tig.com.au/~jmsalvo/ |