Sfoglia il codice sorgente

displaying dummy nodes differently

Kolja Strohm 6 anni fa
parent
commit
6ad14b86c9
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      src/view/NodeView.java

+ 5 - 0
src/view/NodeView.java

@@ -76,6 +76,11 @@ public class NodeView extends JPanel {
         	y += (super.getHeight() - (model.getHeight( layout ) * scale )) / scale / 2;
         if( scale == (double)super.getHeight() / (int)model.getHeight( layout ) )
         	x += (super.getWidth() - (model.getWidth( layout ) * scale )) / scale / 2;
+        if( model.isDummyNode() )
+        {
+            ((Graphics2D)g).scale( 1 / 4.0, 1 );
+            x += width / (3/4.0);
+        }
         paintComponent( g.create( x, y, width, height ) );
         double minX = Double.POSITIVE_INFINITY;
         for( Component c : getComponents() )