Merge remote-tracking branch 'origin/releases/Release_2_10_2b1_Branch'
[jalview.git] / src / jalview / gui / TreeCanvas.java
index e60ac8e..7dc1a99 100755 (executable)
@@ -279,8 +279,9 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
         g.drawString(nodeLabel, xstart + 2, ypos - 2);
       }
 
-      String name = (markPlaceholders && node.isPlaceholder()) ? (PLACEHOLDER + node
-              .getName()) : node.getName();
+      String name = (markPlaceholders && node.isPlaceholder())
+              ? (PLACEHOLDER + node.getName())
+              : node.getName();
 
       int charWidth = fm.stringWidth(name) + 3;
       int charHeight = font.getSize();
@@ -332,10 +333,10 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
         g.fillRect(xend - 2, ypos - 2, 4, 4);
       }
 
-      int ystart = (node.left() == null ? 0 : (int) (((SequenceNode) node
-              .left()).ycount * chunk)) + offy;
-      int yend = (node.right() == null ? 0 : (int) (((SequenceNode) node
-              .right()).ycount * chunk))
+      int ystart = (node.left() == null ? 0
+              : (int) (((SequenceNode) node.left()).ycount * chunk)) + offy;
+      int yend = (node.right() == null ? 0
+              : (int) (((SequenceNode) node.right()).ycount * chunk))
               + offy;
 
       Rectangle pos = new Rectangle(xend - 2, ypos - 2, 5, 5);
@@ -424,8 +425,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
 
     SequenceNode top = tree.getTopNode();
 
-    double wscale = ((width * .8) - (offx * 2))
-            / tree.getMaxHeight();
+    double wscale = ((width * .8) - (offx * 2)) / tree.getMaxHeight();
 
     if (top.count == 0)
     {
@@ -654,8 +654,9 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
 
     if (tree == null)
     {
-      g.drawString(MessageManager.getString("label.calculating_tree")
-              + "....", 20, getHeight() / 2);
+      g.drawString(
+              MessageManager.getString("label.calculating_tree") + "....",
+              20, getHeight() / 2);
     }
     else
     {
@@ -666,9 +667,8 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
         repaint();
       }
 
-      if (fitToWindow
-              || (!fitToWindow && (scrollPane.getHeight() > ((fm
-                      .getHeight() * nameHash.size()) + offy))))
+      if (fitToWindow || (!fitToWindow && (scrollPane
+              .getHeight() > ((fm.getHeight() * nameHash.size()) + offy))))
       {
         draw(g, scrollPane.getWidth(), scrollPane.getHeight());
         setPreferredSize(null);
@@ -752,7 +752,8 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
         g2.setColor(Color.gray);
       }
 
-      int x = (int) ((threshold * (getWidth() - labelLength - (2 * offx))) + offx);
+      int x = (int) ((threshold * (getWidth() - labelLength - (2 * offx)))
+              + offx);
 
       g2.drawLine(x, 0, x, getHeight());
     }
@@ -861,8 +862,8 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
     if (ob instanceof SequenceNode)
     {
       highlightNode = (SequenceNode) ob;
-      this.setToolTipText("<html>"
-              + MessageManager.getString("label.highlightnode"));
+      this.setToolTipText(
+              "<html>" + MessageManager.getString("label.highlightnode"));
       repaint();
 
     }
@@ -1007,9 +1008,8 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
         }
         else
         {
-          cs = ColourSchemeProperty.getColourScheme(sg,
-                  ColourSchemeProperty.getColourName(av
-                          .getGlobalColourScheme()));
+          cs = ColourSchemeProperty.getColourScheme(sg, ColourSchemeProperty
+                  .getColourName(av.getGlobalColourScheme()));
         }
         // cs is null if shading is an annotationColourGradient
         // if (cs != null)
@@ -1029,8 +1029,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
       for (int a = 0; a < aps.length; a++)
       {
         if (aps[a].av.getGlobalColourScheme() != null
-                && aps[a].av.getResidueShading()
-                        .conservationApplied())
+                && aps[a].av.getResidueShading().conservationApplied())
         {
           Conservation c = new Conservation("Group", sg.getSequences(null),
                   sg.getStartRes(), sg.getEndRes());