Explorar o código

displaying dummy nodes differently

Kolja Strohm %!s(int64=6) %!d(string=hai) anos
pai
achega
6ad14b86c9
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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() )