JAL-1645 source formatting and organise imports
[jalview.git] / src / jalview / renderer / AnnotationRenderer.java
index 61194ce..e5c2218 100644 (file)
@@ -102,9 +102,9 @@ public class AnnotationRenderer
       // if (validRes && column>1 && row_annotations[column-2]!=null &&
       // dc.equals(row_annotations[column-2].displayCharacter))
       {
-        g.fillPolygon(new int[]
-        { lastSSX + 5, lastSSX + 5, lastSSX }, new int[]
-        { y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset }, 3);
+        g.fillPolygon(new int[] { lastSSX + 5, lastSSX + 5, lastSSX },
+                new int[] { y + iconOffset, y + 14 + iconOffset,
+                    y + 8 + iconOffset }, 3);
         x1 += 5;
       }
       if (diffdownstream)
@@ -118,9 +118,8 @@ public class AnnotationRenderer
       // display a forward arrow
       if (diffdownstream)
       {
-        g.fillPolygon(new int[]
-        { x2 - 5, x2 - 5, x2 }, new int[]
-        { y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset }, 3);
+        g.fillPolygon(new int[] { x2 - 5, x2 - 5, x2 }, new int[] {
+            y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset }, 3);
         x2 -= 5;
       }
       if (diffupstream)
@@ -227,9 +226,9 @@ public class AnnotationRenderer
       // if (validRes && column>1 && row_annotations[column-2]!=null &&
       // dc.equals(row_annotations[column-2].displayCharacter))
       {
-        g.fillPolygon(new int[]
-        { lastSSX + 5, lastSSX + 5, lastSSX }, new int[]
-        { y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset }, 3);
+        g.fillPolygon(new int[] { lastSSX + 5, lastSSX + 5, lastSSX },
+                new int[] { y + iconOffset, y + 14 + iconOffset,
+                    y + 8 + iconOffset }, 3);
         x1 += 5;
       }
       if (diffdownstream)
@@ -243,9 +242,8 @@ public class AnnotationRenderer
       // display a forward arrow
       if (diffdownstream)
       {
-        g.fillPolygon(new int[]
-        { x2 - 5, x2 - 5, x2 }, new int[]
-        { y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset }, 3);
+        g.fillPolygon(new int[] { x2 - 5, x2 - 5, x2 }, new int[] {
+            y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset }, 3);
         x2 -= 5;
       }
       if (diffupstream)
@@ -634,17 +632,17 @@ public class AnnotationRenderer
                 //
                 // if (scaleColLabel)
                 // {
-                  // justify the label and scale to fit in column
-                  if (fmWidth > charWidth)
-                  {
-                    // scale only if the current font isn't already small enough
-                    fmScaling = charWidth;
-                    fmScaling /= fmWidth;
-                    g.setFont(ofont.deriveFont(AffineTransform
-                            .getScaleInstance(fmScaling, 1.0)));
-                    // and update the label's width to reflect the scaling.
-                    fmWidth = charWidth;
-                  }
+                // justify the label and scale to fit in column
+                if (fmWidth > charWidth)
+                {
+                  // scale only if the current font isn't already small enough
+                  fmScaling = charWidth;
+                  fmScaling /= fmWidth;
+                  g.setFont(ofont.deriveFont(AffineTransform
+                          .getScaleInstance(fmScaling, 1.0)));
+                  // and update the label's width to reflect the scaling.
+                  fmWidth = charWidth;
+                }
                 // }
               }
               // TODO is it ok to use width of / show all characters here?
@@ -1096,11 +1094,9 @@ public class AnnotationRenderer
     {
       g.fillRect(lastSSX, y + 4 + iconOffset,
               (x * charWidth) - lastSSX - 4, 7);
-      g.fillPolygon(new int[]
-      { (x * charWidth) - 4, (x * charWidth) - 4, (x * charWidth) },
-              new int[]
-              { y + iconOffset, y + 14 + iconOffset, y + 7 + iconOffset },
-              3);
+      g.fillPolygon(new int[] { (x * charWidth) - 4, (x * charWidth) - 4,
+          (x * charWidth) }, new int[] { y + iconOffset,
+          y + 14 + iconOffset, y + 7 + iconOffset }, 3);
     }
     else
     {
@@ -1255,8 +1251,7 @@ public class AnnotationRenderer
       g.setColor(_aa.threshold.colour);
       Graphics2D g2 = (Graphics2D) g;
       g2.setStroke(new BasicStroke(1, BasicStroke.CAP_SQUARE,
-              BasicStroke.JOIN_ROUND, 3f, new float[]
-              { 5f, 3f }, 0f));
+              BasicStroke.JOIN_ROUND, 3f, new float[] { 5f, 3f }, 0f));
 
       y2 = (int) (y - ((_aa.threshold.value - min) / range) * graphHeight);
       g.drawLine(0, y2, (eRes - sRes) * charWidth, y2);
@@ -1439,8 +1434,7 @@ public class AnnotationRenderer
       g.setColor(_aa.threshold.colour);
       Graphics2D g2 = (Graphics2D) g;
       g2.setStroke(new BasicStroke(1, BasicStroke.CAP_SQUARE,
-              BasicStroke.JOIN_ROUND, 3f, new float[]
-              { 5f, 3f }, 0f));
+              BasicStroke.JOIN_ROUND, 3f, new float[] { 5f, 3f }, 0f));
 
       y2 = (int) (y - ((_aa.threshold.value - min) / range)
               * _aa.graphHeight);