Merge branch 'develop' into features/JAL-2446NCList
[jalview.git] / src / jalview / appletgui / AlignmentPanel.java
index d679217..8e333ba 100644 (file)
@@ -46,8 +46,8 @@ import java.awt.event.ComponentEvent;
 import java.beans.PropertyChangeEvent;
 import java.util.List;
 
-public class AlignmentPanel extends Panel implements AdjustmentListener,
-        AlignmentViewPanel, ViewportListenerI
+public class AlignmentPanel extends Panel
+        implements AdjustmentListener, AlignmentViewPanel, ViewportListenerI
 {
 
   public AlignViewport av;
@@ -234,10 +234,10 @@ public class AlignmentPanel extends Panel implements AdjustmentListener,
     idPanel.idCanvas.image = null;
     FontMetrics fm = getFontMetrics(av.getFont());
 
-    scalePanel.setSize(new Dimension(10, av.getCharHeight()
-            + fm.getDescent()));
-    idwidthAdjuster.setSize(new Dimension(10, av.getCharHeight()
-            + fm.getDescent()));
+    scalePanel.setSize(
+            new Dimension(10, av.getCharHeight() + fm.getDescent()));
+    idwidthAdjuster.setSize(
+            new Dimension(10, av.getCharHeight() + fm.getDescent()));
     av.updateSequenceIdColours();
     annotationPanel.image = null;
     int ap = annotationPanel.adjustPanelHeight(false);
@@ -358,8 +358,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener,
    * @return false if results were not found
    */
   public boolean scrollToPosition(SearchResultsI results,
-          int verticalOffset,
-          boolean redrawOverview, boolean centre)
+          int verticalOffset, boolean redrawOverview, boolean centre)
   {
     // do we need to scroll the panel?
     if (results != null && results.getSize() > 0)
@@ -380,8 +379,8 @@ public class AlignmentPanel extends Panel implements AdjustmentListener,
       {
         if (JalviewLite.debug)
         {// DEBUG
-          System.out
-                  .println("DEBUG: scroll didn't happen - results not within alignment : "
+          System.out.println(
+                  "DEBUG: scroll didn't happen - results not within alignment : "
                           + seq.getStart() + "," + seq.getEnd());
         }
         return false;
@@ -405,7 +404,8 @@ public class AlignmentPanel extends Panel implements AdjustmentListener,
        */
       if (centre)
       {
-        int offset = (vpRanges.getEndRes() - vpRanges.getStartRes() + 1) / 2 - 1;
+        int offset = (vpRanges.getEndRes() - vpRanges.getStartRes() + 1) / 2
+                - 1;
         start = Math.max(start - offset, 0);
         end = end + offset - 1;
         // end = Math.min(end + offset, seq.getEnd() - 1);
@@ -518,8 +518,8 @@ public class AlignmentPanel extends Panel implements AdjustmentListener,
         /*
          * Scroll down to make end of search results visible
          */
-        setScrollValues(vpRanges.getStartRes(), starts + seqIndex - ends
-                + 1);
+        setScrollValues(vpRanges.getStartRes(),
+                starts + seqIndex - ends + 1);
       }
       /*
        * Else results are already visible - no need to scroll
@@ -571,8 +571,8 @@ public class AlignmentPanel extends Panel implements AdjustmentListener,
     // this is called after loading new annotation onto alignment
     if (alignFrame.getSize().height == 0)
     {
-      System.out
-              .println("adjustAnnotationHeight frame size zero NEEDS FIXING");
+      System.out.println(
+              "adjustAnnotationHeight frame size zero NEEDS FIXING");
     }
     fontChanged();
     validateAnnotationDimensions(true);
@@ -605,8 +605,8 @@ public class AlignmentPanel extends Panel implements AdjustmentListener,
        */
       if (annotationHeight + alignmentHeight > availableHeight)
       {
-        annotationHeight = Math.min(annotationHeight, availableHeight - 2
-                * rowHeight);
+        annotationHeight = Math.min(annotationHeight,
+                availableHeight - 2 * rowHeight);
       }
     }
     else
@@ -623,13 +623,13 @@ public class AlignmentPanel extends Panel implements AdjustmentListener,
     annotationPanel.setSize(new Dimension(d.width, annotationHeight));
     annotationPanelHolder.setSize(new Dimension(d.width, annotationHeight));
     // seqPanelHolder.setSize(d.width, seqandannot - height);
-    seqPanel.seqCanvas
-            .setSize(d.width, seqPanel.seqCanvas.getSize().height);
+    seqPanel.seqCanvas.setSize(d.width,
+            seqPanel.seqCanvas.getSize().height);
 
     Dimension e = idPanel.getSize();
     alabels.setSize(new Dimension(e.width, annotationHeight));
-    annotationSpaceFillerHolder.setSize(new Dimension(e.width,
-            annotationHeight));
+    annotationSpaceFillerHolder
+            .setSize(new Dimension(e.width, annotationHeight));
 
     int s = apvscroll.getValue();
     if (s > mheight - annotationHeight)
@@ -1156,7 +1156,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener,
 
   @Override
   /**
-   * Property change event fired when a change is made to the viewport ranges 
+   * Property change event fired when a change is made to the viewport ranges
    * object associated with this alignment panel's viewport
    */
   public void propertyChange(PropertyChangeEvent evt)