Bamboo test #13 AlignViewport resize and jscrollbar set
authorBobHanson <hansonr@stolaf.edu>
Mon, 23 Mar 2020 23:20:12 +0000 (18:20 -0500)
committerBobHanson <hansonr@stolaf.edu>
Mon, 23 Mar 2020 23:20:12 +0000 (18:20 -0500)
removing synchronize I just added.

src/jalview/gui/AlignViewport.java
src/jalview/gui/AlignmentPanel.java
src/jalview/viewmodel/ViewportRanges.java

index fb3ec3a..9e738c1 100644 (file)
@@ -49,6 +49,7 @@ import jalview.structure.StructureSelectionManager;
 import jalview.structure.VamsasSource;
 import jalview.util.MessageManager;
 import jalview.viewmodel.AlignmentViewport;
+import jalview.viewmodel.ViewportRanges;
 import jalview.ws.params.AutoCalcSetting;
 
 import java.awt.Container;
@@ -330,6 +331,9 @@ public class AlignViewport extends AlignmentViewport
     if (setGrid)
     {
       FontMetrics fm = c.getFontMetrics(font);
+      ViewportRanges.sTest += ("AlignViewport.setFont " + fm.getHeight()
+              + " "
+              + font + "\n");
       int ww = fm.charWidth('M');
       setCharHeight(fm.getHeight());
       setCharWidth(ww);
index 1c2e91c..c43e0b6 100644 (file)
@@ -179,6 +179,9 @@ public class AlignmentPanel extends GAlignmentPanel implements
 
           ranges.setViewportWidth(widthInRes);
           ranges.setViewportHeight(heightInSeq);
+          ViewportRanges.sTest += "AP.resize chht=" + av.getCharHeight()
+                  + "canvHt=" + getSeqPanel().seqCanvas.getHeight() + " "
+                  + heightInSeq + "\n";
         }
       }
 
@@ -744,6 +747,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
       int y = vscroll.getValue();
       int height = getSeqPanel().seqCanvas.getHeight() / av.getCharHeight();
 
+
       // if we're scrolling to the position we're already at, stop
       // this prevents infinite recursion of events when the scroll/viewport
       // ranges values are the same
@@ -751,6 +755,11 @@ public class AlignmentPanel extends GAlignmentPanel implements
       {
         return;
       }
+
+      ViewportRanges.sTest += "AP.valChanged chht=" + av.getCharHeight()
+              + "canvHt=" + getSeqPanel().seqCanvas.getHeight() + " "
+              + height + "\n";
+
       ranges.setViewportStartAndHeight(y, height);
     }
     repaint();
index 51ee8d8..b6bfcd6 100644 (file)
@@ -227,7 +227,6 @@ public class ViewportRanges extends ViewportProperties
    * @param seq
    *          sequence position
    */
-  synchronized
   public void setStartSeq(int seq)
   {
     int height = getViewportHeight();