PaintRefresher called after tree selection made
authoramwaterhouse <Andrew Waterhouse>
Tue, 2 Nov 2004 16:12:02 +0000 (16:12 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 2 Nov 2004 16:12:02 +0000 (16:12 +0000)
src/jalview/gui/TreeCanvas.java

index 1a11630..0f85aed 100755 (executable)
@@ -91,11 +91,11 @@ public class TreeCanvas extends JPanel implements MouseListener
 \r
       int ypos = (int)(node.ycount * chunk) + offy;\r
 \r
-      if (node.element() instanceof SequenceI) {\r
+      if (node.element() instanceof SequenceI)\r
           g.setColor(((SequenceI)((SequenceNode)node).element()).getColor().darker());\r
-      } else {\r
+      else\r
           g.setColor(Color.black);\r
-      }\r
+\r
 \r
       // Draw horizontal line\r
       g.drawLine(xstart,ypos,xend,ypos);\r
@@ -350,20 +350,19 @@ public class TreeCanvas extends JPanel implements MouseListener
 \r
               for (int i=0; i < tree.getGroups().size(); i++) {\r
 \r
-                  int tmp = i%(7);\r
                   Color col = new Color((int)(Math.random()*255),\r
                                         (int)(Math.random()*255),\r
                                         (int)(Math.random()*255));\r
-\r
                   setColor((SequenceNode)tree.getGroups().elementAt(i),col.brighter());\r
 \r
                   // l is vector of Objects\r
-                  Vector l = tree.findLeaves((SequenceNode)tree.getGroups().elementAt(i),new Vector());\r
+                 // Vector l = tree.findLeaves((SequenceNode)tree.getGroups().elementAt(i),new Vector());\r
 \r
               }\r
           }\r
       }\r
 \r
+      PaintRefresher.Refresh(this);\r
       repaint();\r
 \r
   }\r