Formatting
[jalview.git] / src / jalview / gui / TreeCanvas.java
index db5de1c..58ca6f6 100755 (executable)
@@ -1,6 +1,6 @@
 /*
  * Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  */
 package jalview.gui;
 
-import jalview.analysis.*;
-
-import jalview.datamodel.*;
-
-import jalview.schemes.*;
-
-import jalview.util.*;
+import java.util.*;
 
 import java.awt.*;
 import java.awt.event.*;
 import java.awt.print.*;
-
-import java.util.*;
-
 import javax.swing.*;
 
+import jalview.analysis.*;
+import jalview.datamodel.*;
+import jalview.schemes.*;
+import jalview.util.*;
 
 /**
  * DOCUMENT ME!
@@ -41,7 +36,8 @@ import javax.swing.*;
  * @author $author$
  * @version $Revision$
  */
-public class TreeCanvas extends JPanel implements MouseListener, Runnable,
+public class TreeCanvas
+    extends JPanel implements MouseListener, Runnable,
     Printable, MouseMotionListener
 {
   /** DOCUMENT ME!! */
@@ -269,9 +265,13 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
       // Draw horizontal line
       g.drawLine(xstart, ypos, xend, ypos);
       if (node == highlightNode)
+      {
         g.fillRect(xend - 3, ypos - 3, 6, 6);
+      }
       else
+      {
         g.fillRect(xend - 2, ypos - 2, 4, 4);
+      }
 
       int ystart = (int) ( ( (SequenceNode) node.left()).ycount * chunk) +
           offy;
@@ -827,11 +827,13 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
 
         }
         else
+        {
           cs = ColourSchemeProperty.getColour(sequences,
                                               av.alignment.getWidth(),
                                               ColourSchemeProperty.
                                               getColourName(
                                                   av.getGlobalColourScheme()));
+        }
 
         cs.setThreshold(av.getGlobalColourScheme().getThreshold(),
                         av.getIgnoreGapsConsensus());
@@ -842,7 +844,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
                                            0,
                                            av.alignment.getWidth() - 1);
 
-      sg.setName("JTreeGroup:"+sg.hashCode());
+      sg.setName("JTreeGroup:" + sg.hashCode());
 
       AlignmentPanel[] aps = getAssociatedPanels();
       for (int a = 0; a < aps.length; a++)
@@ -906,6 +908,10 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
       return PaintRefresher.getAssociatedPanels(av.getSequenceSetId());
     }
     else
-      return new AlignmentPanel[]{ap};
+    {
+      return new AlignmentPanel[]
+          {
+          ap};
+    }
   }
 }