Merge remote-tracking branch 'origin/develop' into bug/JAL-2665-2.10.3
[jalview.git] / src / jalview / appletgui / AnnotationPanel.java
index 417bb06..6fe71de 100755 (executable)
@@ -51,9 +51,9 @@ import java.awt.event.MouseListener;
 import java.awt.event.MouseMotionListener;
 import java.beans.PropertyChangeEvent;
 
-public class AnnotationPanel extends Panel implements AwtRenderPanelI,
-        AdjustmentListener, ActionListener, MouseListener,
-        MouseMotionListener, ViewportListenerI
+public class AnnotationPanel extends Panel
+        implements AwtRenderPanelI, AdjustmentListener, ActionListener,
+        MouseListener, MouseMotionListener, ViewportListenerI
 {
   AlignViewport av;
 
@@ -153,7 +153,8 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
 
     if (anot.length < av.getColumnSelection().getMax())
     {
-      Annotation[] temp = new Annotation[av.getColumnSelection().getMax() + 2];
+      Annotation[] temp = new Annotation[av.getColumnSelection().getMax()
+              + 2];
       System.arraycopy(anot, 0, temp, 0, anot.length);
       anot = temp;
       aa[activeRow].annotations = anot;
@@ -287,8 +288,8 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
           anot[index] = new Annotation(label, "", type, 0);
         }
 
-        anot[index].secondaryStructure = type != 'S' ? type : label
-                .length() == 0 ? ' ' : label.charAt(0);
+        anot[index].secondaryStructure = type != 'S' ? type
+                : label.length() == 0 ? ' ' : label.charAt(0);
         anot[index].displayCharacter = label;
       }
     }
@@ -353,7 +354,8 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
       }
     }
 
-    if ((evt.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK
+    if ((evt.getModifiers()
+            & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK
             && activeRow != -1)
     {
       if (av.getColumnSelection() == null
@@ -425,11 +427,14 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
   {
     if (graphStretch > -1)
     {
-      av.getAlignment().getAlignmentAnnotation()[graphStretch].graphHeight += graphStretchY
-              - evt.getY();
-      if (av.getAlignment().getAlignmentAnnotation()[graphStretch].graphHeight < 0)
+      av.getAlignment()
+              .getAlignmentAnnotation()[graphStretch].graphHeight += graphStretchY
+                      - evt.getY();
+      if (av.getAlignment()
+              .getAlignmentAnnotation()[graphStretch].graphHeight < 0)
       {
-        av.getAlignment().getAlignmentAnnotation()[graphStretch].graphHeight = 0;
+        av.getAlignment()
+                .getAlignmentAnnotation()[graphStretch].graphHeight = 0;
       }
       graphStretchY = evt.getY();
       av.calcPanelHeight();
@@ -509,18 +514,19 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
             String name;
             if (av.getAlignment().isNucleotide())
             {
-              name = ResidueProperties.nucleotideName.get(String
-                      .valueOf(residue));
-              text.append(" Nucleotide: ").append(
-                      name != null ? name : residue);
+              name = ResidueProperties.nucleotideName
+                      .get(String.valueOf(residue));
+              text.append(" Nucleotide: ")
+                      .append(name != null ? name : residue);
             }
             else
             {
-              name = 'X' == residue ? "X" : ('*' == residue ? "STOP"
-                      : ResidueProperties.aa2Triplet.get(String
-                              .valueOf(residue)));
-              text.append(" Residue: ").append(
-                      name != null ? name : residue);
+              name = 'X' == residue ? "X"
+                      : ('*' == residue ? "STOP"
+                              : ResidueProperties.aa2Triplet
+                                      .get(String.valueOf(residue)));
+              text.append(" Residue: ")
+                      .append(name != null ? name : residue);
             }
             int residuePos = seqref.findPosition(column);
             text.append(" (").append(residuePos).append(")");
@@ -626,8 +632,8 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
 
     gg.setColor(Color.white);
     gg.fillRect(0, 0, getSize().width, getSize().height);
-    drawComponent(gg, av.getRanges().getStartRes(), av.getRanges()
-            .getEndRes() + 1);
+    drawComponent(gg, av.getRanges().getStartRes(),
+            av.getRanges().getEndRes() + 1);
 
     g.drawImage(image, 0, 0, this);
   }
@@ -644,7 +650,8 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
 
     gg.copyArea(0, 0, imgWidth, getSize().height,
             -horizontal * av.getCharWidth(), 0);
-    int sr = av.getRanges().getStartRes(), er = av.getRanges().getEndRes() + 1, transX = 0;
+    int sr = av.getRanges().getStartRes(),
+            er = av.getRanges().getEndRes() + 1, transX = 0;
 
     if (horizontal > 0) // scrollbar pulled right, image to the left
     {