Commits

Anonymous committed bfcaa7f

Just a test for better layouting

Comments (0)

Files changed (1)

src/nl/tudelft/lime/layout/insidecomponent/InsideComponentClusterEdgeCreator.java

 import nl.tudelft.lime.layout.DummyEdgePart;
 import nl.tudelft.lime.model.port.InputPort;
 
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Insets;
 import org.eclipse.draw2d.graph.DirectedGraph;
 import org.eclipse.draw2d.graph.Edge;
 import org.eclipse.draw2d.graph.EdgeList;
             }
             //we don't use it by now
             coalesceRemainingClusters();
+            //for a better layout of ports and components
+            //if output ports are less than two then create dummy nodes for them
+//            createDummyNodes();
             //now connect all the clusters
             joinClusters();
         } catch (RuntimeException e) {
             throw e;
         }
     }
+    /**
+     * Create dummy output nodes for a better layout
+     */
+//    private void createDummyNodes() {
+//    	if (outputPortCluster.set.size() == 1){
+//            Node n = new Node();
+//
+//            n.width = 20;
+//            n.height = 100;
+//            n.setPadding(new Insets(10, 10, 10, 10));
+//            outputPortCluster.set.add(n);
+//    	}
+//	}
 
-    /**
+	/**
      * If recursion fails to join all the remaining
      */
     private void coalesceRemainingClusters() {