Selaa lähdekoodia

nicer Pseodocode Tree

Kolja Strohm 6 vuotta sitten
vanhempi
commit
d0f36030ab

+ 49 - 3
src/bk/BKNodePlacement.java

@@ -11,8 +11,11 @@ import animation.Memory;
 import animation.PseudoCodeNode;
 import animation.PseudoCodeProcessor;
 import animation.Memory.MemoryType;
+import codelines.DeclareVariable;
 import codelines.FunctionCall;
 import codelines.FunctionDefinition;
+import codelines.Kommentar;
+import codelines.SetVariable;
 import graph.LayeredGraphNode;
 import lib.TextLayoutHelper;
 
@@ -53,7 +56,7 @@ public class BKNodePlacement extends AnimatedAlgorithm {
     @Override
     public PseudoCodeNode createPseudocodeTree( JTree tree )
     {
-    	String[] vars = { "graph" };
+    	String[] vars = { "layout", "graph" };
     	PseudoCodeNode mainFunction = new PseudoCodeNode( TextLayoutHelper.setupPseudoCode("function bkNodePlacement( graph )", vars ), tree, new FunctionDefinition( new String[]{"graph"} ) );
     	root = new PseudoCodeNode( TextLayoutHelper.setupPseudoCodeStage("-- BK Node Placement Algorithm --" ), tree, new CodeLine() {
 
@@ -79,10 +82,53 @@ public class BKNodePlacement extends AnimatedAlgorithm {
         root.setSelected( true );
     	
         PseudoCodeNode conflictDetectionFunction = new ConflictDetection( this ).createPseudocodeTree( tree );
-        PseudoCodeNode node1 = new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "call detectConflicts( graph )", vars ), tree, new FunctionCall( conflictDetectionFunction, new String[]{ "graph" } ) );
+        PseudoCodeNode calcLayout = new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "function calcLayout( layout, graph )", vars ), tree, new FunctionDefinition( vars ) );
+        PseudoCodeNode combine = new Combine().createPseudocodeTree( tree );
         root.add( mainFunction );
-        mainFunction.add( node1 );
+        mainFunction.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "call detectConflicts( graph )", vars ), tree, new FunctionCall( conflictDetectionFunction, new String[]{ "graph" } ) ) );
+        mainFunction.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "layout = TOP_LEFT", vars ), tree, new DeclareVariable<String>( "layout" ) {
+            @Override
+            protected String value(Memory m) {
+                return "TOP_LEFT";
+            }
+        }) );
+        mainFunction.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "call calcLayout( layout, graph )", vars ), tree, new FunctionCall( calcLayout, new String[]{ "layout", "graph" } ) ) );
+        mainFunction.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "layout = TOP_RIGHT", vars ), tree, new SetVariable<String>( "layout" ) {
+            @Override
+            protected String value(Memory m) {
+                return "TOP_RIGHT";
+            }
+        }) );
+        mainFunction.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "call calcLayout( layout, graph )", vars ), tree, new FunctionCall( calcLayout, new String[]{ "layout", "graph" } ) ) );
+        mainFunction.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "layout = BOTTOM_LEFT", vars ), tree, new SetVariable<String>( "layout" ) {
+            @Override
+            protected String value(Memory m) {
+                return "BOTTOM_LEFT";
+            }
+        }) );
+        mainFunction.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "call calcLayout( layout, graph )", vars ), tree, new FunctionCall( calcLayout, new String[]{ "layout", "graph" } ) ) );
+        mainFunction.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "layout = BOTTOM_RIGHT", vars ), tree, new SetVariable<String>( "layout" ) {
+            @Override
+            protected String value(Memory m) {
+                return "BOTTOM_RIGHT";
+            }
+        }) );
+        mainFunction.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "call calcLayout( layout, graph )", vars ), tree, new FunctionCall( calcLayout, new String[]{ "layout", "graph" } ) ) );
+        mainFunction.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "call combine( graph )", vars ), tree, new FunctionCall( combine, new String[]{ "graph" } ) ) );
+        root.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCodeStage( "-- Markiert alle Typ 1 konflikte im Graphen --" ), tree, new Kommentar() ) );
         root.add( conflictDetectionFunction );
+        PseudoCodeNode blockCalc = new BlockCalc().createPseudocodeTree( tree );
+        PseudoCodeNode horizontalCompaction = new Compaction().createPseudocodeTree( tree );
+        calcLayout.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "call calculateBlockGraph( layout, graph )", vars ), tree, new FunctionCall( blockCalc, vars ) ) );
+        calcLayout.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "call horizontalCompaction( layout, graph )", vars ), tree, new FunctionCall( horizontalCompaction, vars ) ) );
+        root.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCodeStage( "-- Berechnet ein bestimmtes extremes layout --" ), tree, new Kommentar() ) );
+        root.add( calcLayout );
+        root.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCodeStage( "-- Berechnet den Blockgraphen eines layouts --" ), tree, new Kommentar() ) );
+        root.add( blockCalc );
+        root.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCodeStage( "-- Berechnet die Positionen der Knoten eines Layouts --" ), tree, new Kommentar() ) );
+        root.add( horizontalCompaction );
+        root.add( new PseudoCodeNode( TextLayoutHelper.setupPseudoCodeStage( "-- Kombiniert die 4 Layouts zum Ergebnis --" ), tree, new Kommentar() ) );
+        root.add( combine );
         processor = new PseudoCodeProcessor( root );
         return root;
     }

+ 1 - 1
src/bk/BlockCalc.java

@@ -17,7 +17,7 @@ public class BlockCalc implements AlgorithmStage {
     @Override
     public PseudoCodeNode createPseudocodeTree( JTree tree ) {
         String[] vars = { "graph", "L", "v", "r", "neighbors", "layout" };
-        PseudoCodeNode root = new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "calculateBlockGraph( graph, layout )", vars ), tree, new FunctionDefinition( new String[]{ "graph", "layout" } ) );
+        PseudoCodeNode root = new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "function calculateBlockGraph( graph, layout )", vars ), tree, new FunctionDefinition( new String[]{ "graph", "layout" } ) );
         
         return root;
     }

+ 3 - 12
src/bk/Combine.java

@@ -3,10 +3,8 @@ package bk;
 import javax.swing.JTree;
 
 import animation.AlgorithmStage;
-import animation.CodeLine;
-import animation.ControlFlow;
-import animation.Memory;
 import animation.PseudoCodeNode;
+import codelines.FunctionDefinition;
 import lib.TextLayoutHelper;
 
 /**
@@ -18,15 +16,8 @@ public class Combine implements AlgorithmStage {
 
     @Override
     public PseudoCodeNode createPseudocodeTree( JTree tree ) {
-        PseudoCodeNode root = new PseudoCodeNode( TextLayoutHelper.setupPseudoCodeStage("Balancing"), tree, new CodeLine() {
-
-			@Override
-			public ControlFlow runForward(Memory m) {
-				// TODO Auto-generated method stub
-				return null;
-			}
-        	
-        } );
+        String[] vars = { "graph" };
+        PseudoCodeNode root = new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "function combine( graph )", vars ), tree, new FunctionDefinition( vars ) );
         return root;
     }
 }

+ 3 - 11
src/bk/Compaction.java

@@ -3,10 +3,8 @@ package bk;
 import javax.swing.JTree;
 
 import animation.AlgorithmStage;
-import animation.CodeLine;
-import animation.ControlFlow;
-import animation.Memory;
 import animation.PseudoCodeNode;
+import codelines.FunctionDefinition;
 import lib.TextLayoutHelper;
 
 /**
@@ -18,14 +16,8 @@ public class Compaction implements AlgorithmStage {
 
     @Override
     public PseudoCodeNode createPseudocodeTree( JTree tree ) {
-        PseudoCodeNode root = new PseudoCodeNode( TextLayoutHelper.setupPseudoCodeStage("Horizontal compaction"), tree, new CodeLine() {
-
-			@Override
-			public ControlFlow runForward(Memory m) {
-				return null;
-			}
-        	
-        } );
+        String[] vars = { "layout", "graph" };
+        PseudoCodeNode root = new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "function horizontalCompaction( layout, graph )", vars ), tree, new FunctionDefinition( vars ) );
         return root;
     }
 }

+ 1 - 1
src/bk/ConflictDetection.java

@@ -12,7 +12,7 @@ import animation.Memory;
 import animation.PseudoCodeNode;
 import animation.Memory.MemoryType;
 import bk.BKNodePlacement.State;
-import bk.ExtremalLayoutCalc.LayoutType;
+import bk.LayoutType;
 import codelines.DeclareVariable;
 import codelines.ForEachLoop;
 import codelines.ForLoop;

+ 0 - 46
src/bk/ExtremalLayoutCalc.java

@@ -1,46 +0,0 @@
-package bk;
-
-import javax.swing.JTree;
-
-import animation.AlgorithmStage;
-import animation.CodeLine;
-import animation.ControlFlow;
-import animation.Memory;
-import animation.PseudoCodeNode;
-import lib.TextLayoutHelper;
-
-/**
- * The stage where the for extremal layouts are computed.
- * @author kolja
- *
- */
-public class ExtremalLayoutCalc implements AlgorithmStage {
-	
-	/**
-     * There are four types of layouts, based on iteration order and median alignment.
-     * Additionally there is one layout for the combined coordinates.
-     * @author kolja
-     *
-     */
-    public enum LayoutType{
-        TOP_BOTTOM_LEFT,
-        TOP_BOTTOM_RIGHT,
-        BOTTOM_TOP_LEFT,
-        BOTTOM_TOP_RIGHT,
-        COMBINED
-    }
-
-    @Override
-    public PseudoCodeNode createPseudocodeTree( JTree tree ) {
-    	PseudoCodeNode root = new PseudoCodeNode( TextLayoutHelper.setupPseudoCode( "function calcLaout( layout, graph )", new String[0] ), tree, new CodeLine() {
-
-			@Override
-			public ControlFlow runForward(Memory m) {
-				// TODO Auto-generated method stub
-				return null;
-			}
-    		
-    	} );
-        return root;
-    }
-}

+ 15 - 0
src/bk/LayoutType.java

@@ -0,0 +1,15 @@
+package bk;
+
+/**
+ * There are four types of layouts, based on iteration order and median alignment.
+ * Additionally there is one layout for the combined coordinates.
+ * @author kolja
+ *
+ */
+public enum LayoutType{
+    TOP_BOTTOM_LEFT,
+    TOP_BOTTOM_RIGHT,
+    BOTTOM_TOP_LEFT,
+    BOTTOM_TOP_RIGHT,
+    COMBINED
+}

+ 1 - 1
src/graph/InitializeNodePositions.java

@@ -3,7 +3,7 @@ package graph;
 import java.awt.Color;
 import java.util.ArrayList;
 
-import bk.ExtremalLayoutCalc.LayoutType;
+import bk.LayoutType;
 
 
 /**

+ 1 - 1
src/graph/LayeredEdge.java

@@ -5,7 +5,7 @@ import java.util.ArrayList;
 
 import org.eclipse.elk.graph.ElkEdge;
 
-import bk.ExtremalLayoutCalc.LayoutType;
+import bk.LayoutType;
 import view.NodeView;
 
 /**

+ 1 - 1
src/graph/LayeredGraphEdge.java

@@ -5,7 +5,7 @@ import java.util.ArrayList;
 
 import org.eclipse.elk.graph.ElkEdge;
 
-import bk.ExtremalLayoutCalc.LayoutType;
+import bk.LayoutType;
 
 /**
  * Ein Interface, welches die Methoden einer Kante aus einem gelayerten Graphen beschreibt

+ 1 - 1
src/graph/LayeredGraphNode.java

@@ -6,7 +6,7 @@ import java.util.ArrayList;
 import org.eclipse.elk.graph.ElkEdge;
 import org.eclipse.elk.graph.ElkNode;
 
-import bk.ExtremalLayoutCalc.LayoutType;
+import bk.LayoutType;
 
 /**
  * Ein Interface, welches die Methoden eines Knotens aus einem gelayerten

+ 1 - 1
src/graph/LayeredNode.java

@@ -8,7 +8,7 @@ import org.eclipse.elk.graph.ElkEdge;
 import org.eclipse.elk.graph.ElkNode;
 import org.eclipse.emf.common.util.EList;
 
-import bk.ExtremalLayoutCalc.LayoutType;
+import bk.LayoutType;
 import view.NodeView;
 
 /**

+ 1 - 1
src/view/EdgeView.java

@@ -10,7 +10,7 @@ import java.util.ArrayList;
 
 import javax.swing.JPanel;
 
-import bk.ExtremalLayoutCalc.LayoutType;
+import bk.LayoutType;
 import graph.LayeredGraphEdge;
 
 /**

+ 4 - 1
src/view/MainView.java

@@ -38,7 +38,7 @@ import animation.Action;
 import animation.AnimationController;
 import animation.PseudoCodeNode;
 import bk.BKNodePlacement;
-import bk.ExtremalLayoutCalc.LayoutType;
+import bk.LayoutType;
 import graph.InitializeNodePositions;
 import graph.LayeredGraphEdge;
 import graph.LayeredGraphNode;
@@ -419,6 +419,7 @@ public class MainView {
         pseudoTree.setCellRenderer( new PseudoCodeRenderer() );
         pseudoTree.setSelectionModel( null );
         pseudoTree.setToolTipText("");
+        pseudoTree.putClientProperty("JTree.lineStyle", "Angled");
         pseudoTree.addMouseListener( new MouseAdapter() {
             public void mousePressed(MouseEvent e) {
                 TreePath selPath = pseudoTree.getPathForLocation(e.getX(), e.getY());
@@ -442,6 +443,8 @@ public class MainView {
         pseudoTree.setRowHeight(15);
         ((PseudoCodeRenderer)pseudoTree.getCellRenderer()).setMemory( algorithm.getProcessor().getMemory());
         JScrollPane treeView = new JScrollPane( pseudoTree );
+        PseudoCodeLines lineView = new PseudoCodeLines( pseudoTree );
+        treeView.setRowHeaderView( lineView );
         treeView.setBounds( 10,  110,  390, 380 );
         
         JTextArea debugText = new JTextArea();

+ 1 - 1
src/view/NodeView.java

@@ -12,7 +12,7 @@ import javax.swing.BorderFactory;
 import javax.swing.JPanel;
 import javax.swing.border.Border;
 
-import bk.ExtremalLayoutCalc.LayoutType;
+import bk.LayoutType;
 import graph.LayeredGraphNode;
 
 /**

+ 140 - 0
src/view/PseudoCodeLines.java

@@ -0,0 +1,140 @@
+package view;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Rectangle;
+import java.awt.RenderingHints;
+
+import javax.swing.ImageIcon;
+import javax.swing.JComponent;
+import javax.swing.JScrollPane;
+import javax.swing.JTree;
+import javax.swing.JViewport;
+import javax.swing.tree.TreeNode;
+
+import animation.PseudoCodeNode;
+
+/**
+ * JComponent used to draw line numbers. This JComponent should be added as a row header view in a JScrollPane. Based upon the 
+ * LineNumberModel provided, this component will draw the line numbers as needed.
+ * @author Greg Cope
+ *
+ */
+
+public class PseudoCodeLines extends JComponent{
+   
+    static final long serialVersionUID = 432143214L;
+   
+    //pixel padding on left and right
+    private static final int HORIZONTAL_PADDING = 1;
+    //pixel padding on left and right
+    private static final int VERTICAL_PADDING = 3;
+    
+    private static ImageIcon currentLine = new ImageIcon( PseudoCodeNode.class.getResource( "/img/current_line.png" ) );
+    
+    private JTree tree;
+    
+    /**
+     * Constructs a new Component with no model
+     */
+    public PseudoCodeLines( JTree t ){
+        super();
+        tree = t;
+    }
+    
+    /**
+     * Checks and adjusts the width of this component based upon the line numbers
+     */
+    public void adjustWidth(){
+        int max = getLineNumber( (TreeNode)tree.getPathForRow( tree.getRowCount() - 1 ).getLastPathComponent() );
+        if ( getGraphics() == null ){
+            return;
+        }
+        int width = getGraphics().getFontMetrics().stringWidth(String.valueOf(max)) + 2 * HORIZONTAL_PADDING + 30;
+        JComponent c = (JComponent)getParent();
+        if (c == null){//not within a container
+            return;
+        }
+        Dimension dimension = c.getPreferredSize();
+        if ( c instanceof JViewport ){//do some climbing up the component tree to get the main JScrollPane view
+            JViewport view = (JViewport)c;
+            Component parent = view.getParent();
+            if ( parent != null && parent instanceof JScrollPane){
+                JScrollPane scroller = (JScrollPane)view.getParent();
+                dimension = scroller.getViewport().getView().getPreferredSize();
+            }           
+        }
+        if ( width > super.getPreferredSize().width || width < super.getPreferredSize().width){
+            setPreferredSize(new Dimension(width + 2*HORIZONTAL_PADDING, dimension.height));
+            revalidate();
+            repaint();
+        }
+    }
+    
+    @Override
+    public Dimension getPreferredSize()
+    {
+        return super.getPreferredSize();
+    }
+    
+    private int countChildren( TreeNode treeNode )
+    {
+        if( treeNode.isLeaf() )
+            return 0;
+        else
+        {
+            int sum = 0;
+            for( int i = 0; i < treeNode.getChildCount(); i++ )
+            {
+                sum += countChildren( treeNode.getChildAt( i ) ) + 1;
+            }
+            return sum;
+        }
+    }
+
+    private int getLineNumber( TreeNode treeNode )
+    {
+        TreeNode parent = treeNode.getParent();
+        if( parent == null )
+            return 1;
+        int sum = getLineNumber( parent ) + 1;
+        for( int i = 0; i < parent.getChildCount(); i++ )
+        {
+            if( i == parent.getIndex( treeNode ) )
+                return sum;
+            sum += countChildren( parent.getChildAt( i ) ) + 1;
+        }
+        return 0;
+    }
+    
+    @Override
+    public void paintComponent(Graphics g){
+        adjustWidth();
+        super.paintComponent(g);
+        Graphics2D g2d = (Graphics2D)g;
+        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+        g.setColor(RenderHelper.BACKGROUND_COLOR);
+        g2d.fillRect(0, 0, getWidth(), getHeight());
+        g.setColor(RenderHelper.FOREGROUND_COLOR);
+        for ( int i = 0; i < tree.getRowCount(); i++ ){
+            PseudoCodeNode node = (PseudoCodeNode)tree.getPathForRow( i ).getLastPathComponent();
+            int number = getLineNumber( node );
+            Rectangle rect = tree.getRowBounds( i );
+            String text = String.valueOf( number );
+            int yPosition = rect.y + rect.height - VERTICAL_PADDING;
+            if( !node.hasSelectedSubnode() && node.isSelected() )
+                g.drawImage( currentLine.getImage(), HORIZONTAL_PADDING, rect.y + VERTICAL_PADDING - 5, 20, 20, null );
+            g2d.drawString( text, HORIZONTAL_PADDING * 2 + 20, yPosition );
+            if( node.hasBreakPoint() )
+            {
+                Color c = g.getColor();
+                g.setColor( new Color (0xe7887a) );
+                g.fillOval( getWidth() - HORIZONTAL_PADDING - 10, rect.y + VERTICAL_PADDING, 10, 10 );
+                g.setColor( c );
+            }
+        }
+    }
+}

+ 3 - 68
src/view/PseudoCodeRenderer.java

@@ -2,21 +2,14 @@ package view;
 
 import java.awt.Color;
 import java.awt.Component;
-import java.awt.Dimension;
 import java.awt.Font;
-import java.awt.Graphics2D;
-import java.awt.image.BufferedImage;
 
-import javax.swing.ImageIcon;
 import javax.swing.JTree;
 import javax.swing.tree.DefaultTreeCellRenderer;
-import javax.swing.tree.TreeNode;
 
 import animation.Memory;
 import animation.Memory.MemoryType;
 import animation.PseudoCodeNode;
-import graph.LayeredGraphEdge;
-import graph.LayeredGraphNode;
 import lib.TextLayoutHelper;
 
 /**
@@ -28,7 +21,6 @@ import lib.TextLayoutHelper;
 public class PseudoCodeRenderer extends DefaultTreeCellRenderer {
 	
     private static final long serialVersionUID = 1L;
-    private static ImageIcon currentLine = new ImageIcon( PseudoCodeNode.class.getResource( "/img/current_line.png" ) );
     
     private Color specialColor = null;
     
@@ -54,36 +46,6 @@ public class PseudoCodeRenderer extends DefaultTreeCellRenderer {
         return new Color(0xa9b7c6);
     }
     
-    private int countChildren( TreeNode treeNode )
-    {
-        if( treeNode.isLeaf() )
-            return 0;
-        else
-        {
-            int sum = 0;
-            for( int i = 0; i < treeNode.getChildCount(); i++ )
-            {
-                sum += countChildren( treeNode.getChildAt( i ) ) + 1;
-            }
-            return sum;
-        }
-    }
-
-    private int getLineNumber( TreeNode treeNode )
-    {
-        TreeNode parent = treeNode.getParent();
-        if( parent == null )
-            return 1;
-        int sum = getLineNumber( parent ) + 1;
-        for( int i = 0; i < parent.getChildCount(); i++ )
-        {
-            if( i == parent.getIndex( treeNode ) )
-                return sum;
-            sum += countChildren( parent.getChildAt( i ) ) + 1;
-        }
-        return 0;
-    }
-    
     @Override
     public Font getFont() {
         return new Font("Monospaced", Font.PLAIN, 12);
@@ -97,38 +59,11 @@ public class PseudoCodeRenderer extends DefaultTreeCellRenderer {
     
     @Override
     public Component getTreeCellRendererComponent(JTree tree, Object value, boolean arg2, boolean arg3, boolean arg4, int arg5, boolean arg6) {
-
         PseudoCodeNode node = (PseudoCodeNode) value;
-        int width = 10;
-        if( !node.hasSelectedSubnode() && node.isSelected() )
-            width += 25;
-        if( node.hasBreakPoint() )
-            width += 15;
-        String line = "" + getLineNumber( (TreeNode) value );
-        width += tree.getFontMetrics( this.getFont() ).stringWidth( line );
-        this.setPreferredSize( new Dimension( width + tree.getFontMetrics( this.getFont() ).stringWidth( (String)node.getUserObject() ) + 5, 30 ) );
-        this.setSize( new Dimension( width + tree.getFontMetrics( this.getFont() ).stringWidth( (String)node.getUserObject() ) + 5, 30 ) );
         this.doLayout();
-        BufferedImage rowNumerImg = new BufferedImage( width, 30, BufferedImage.TYPE_INT_ARGB );
-        Graphics2D g = (Graphics2D) rowNumerImg.getGraphics();
-        int x = 5;
-        if( !node.hasSelectedSubnode() && node.isSelected() )
-        {
-        	g.drawImage( currentLine.getImage(), x, 5, 20, 20, null );
-        	x += 25;
-        }
-        g.setColor( RenderHelper.CURRENT_LINE_COLOR );
-        g.drawString( line, x, 20 );
-        x += g.getFontMetrics().stringWidth( line ) + 5;
-        if( node.hasBreakPoint() )
-        {
-            g.setColor( new Color (0xe7887a) );
-            g.fillOval(x, 10, 10, 10 );
-        }
-        g.dispose();
-        this.setClosedIcon( new ImageIcon( rowNumerImg ) );
-        this.setOpenIcon( new ImageIcon( rowNumerImg ) );
-        this.setLeafIcon( new ImageIcon( rowNumerImg ) );
+        this.setClosedIcon( null );
+        this.setOpenIcon( null );
+        this.setLeafIcon( null );
         super.getTreeCellRendererComponent(tree, value, arg2, arg3, arg4, arg5, arg6);
         specialColor = null;
         if(node.isSelected()) {