Login | Register
My pages Projects Community openCollabNet

Discussions > issues > [Bug 186] New - Use existing diagram elements in LayerPerspective

gef
Discussion topic

Back to topic list

[Bug 186] New - Use existing diagram elements in LayerPerspective

Reply

Author bugmaster at tigris dot org
Full name bugmaster at tigris dot org
Date 2000-08-03 05:21:40 PDT
Message http://www.tigris.or​g/bugs/show_bug.cgi?​id=186

*** shadow/186 Thu Aug 3 05:21:40 2000
--- shadow/186.tmp.20344 Thu Aug 3 05:21:40 2000
***************
*** 0 ****
--- 1,43 ----
+ Bug#: 186
+ Product: gef
+ Version: 0.7
+ Platform: PC
+ OS/Version: Linux
+ Status: NEW
+ Resolution:
+ Severity: enhancement
+ Priority: P3
+ Component: dist
+ Area: BUILD
+ AssignedTo: bugs at gef dot tigris dot org
+ ReportedBy: tnfink at inf dot fu-berlin dot de
+ URL:
+ Summary: Use existing diagram elements in LayerPerspective
+
+ If LayerPerspective is constructed with a filled GraphModel it does not use
+ these elements. For my application it is convenient to first create the network
+ layer and then generate the GUI stuff.
+
+ Therefor I changed the constructor to:
+ ==-
+ public LayerPerspective(String name, GraphModel gm) {
+ super(name);
+ _gm = gm;
+ _gm.addGraphEventLis​tener(this);
+
+ // tnfink (start)
+ Vector nodes = gm.getNodes();
+ for (int i=0; i<nodes.size();i++) {
+ nodeAdded(new GraphEvent(this,nodes.get(i)));
+ }
+ Vector edges = gm.getEdges();
+ for (int i=0; i<edges.size();i++) {
+ edgeAdded(new GraphEvent(this,edges.get(i)));
+ }
+ // tnfink (end)
+ }
+
+ ==-
+
+ I hope that this fix does not create strange side-effects but up to now it
+ works.

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

[Bug 186] New - Use existing diagram elements in LayerPerspective bugmaster at tigris dot org bugmaster at tigris dot org 2000-08-03 05:21:40 PDT
Messages per page: