JAL-2587 Adjusting height for progress bar
authorkiramt <k.mourao@dundee.ac.uk>
Wed, 9 Aug 2017 11:14:57 +0000 (12:14 +0100)
committerkiramt <k.mourao@dundee.ac.uk>
Wed, 9 Aug 2017 11:14:57 +0000 (12:14 +0100)
src/jalview/gui/OverviewCanvas.java
src/jalview/gui/OverviewPanel.java

index 536301e..e49fd19 100644 (file)
@@ -26,7 +26,6 @@ import jalview.viewmodel.OverviewDimensions;
 
 import java.awt.AlphaComposite;
 import java.awt.Color;
-import java.awt.Dimension;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
 import java.awt.event.ActionEvent;
@@ -169,10 +168,8 @@ public class OverviewCanvas extends JComponent
   public void draw(boolean showSequenceFeatures, boolean showAnnotation,
           FeatureRenderer transferRenderer)
   {
-    System.out.println(this.getHeight());
-    //od.setHeight(this.getHeight());
-    //od.setWidth(this.getWidth());
-    setPreferredSize(new Dimension(od.getWidth(), od.getHeight()));
+    // System.out.println(this.getHeight());
+    // setPreferredSize(new Dimension(od.getWidth(), od.getHeight()));
 
     miniMe = null;
     veryLastMiniMe = lastMiniMe;
@@ -266,6 +263,8 @@ public class OverviewCanvas extends JComponent
         }
         else
         {
+          System.out.println("Resetting height from/to: " + od.getHeight()
+                  + " " + getHeight());
           od.setWidth(getWidth());
           od.setHeight(getHeight());
         }
index ef064f4..4a0fadf 100755 (executable)
@@ -86,6 +86,8 @@ public class OverviewPanel extends JPanel implements Runnable,
             (av.isShowAnnotation() && av
                     .getAlignmentConservationAnnotation() != null));
 
+    // setSize(od.getWidth(), od.getHeight() + 20);
+
     setLayout(new BorderLayout());
     progressPanel = new ProgressPanel(OverviewRenderer.UPDATE,
             MessageManager.getString("label.oview_calc"));
@@ -159,7 +161,6 @@ public class OverviewPanel extends JPanel implements Runnable,
           }
         }
         else
-        // if (!av.getWrapAlignment())
         {
           if (!od.isPositionInBox(evt.getX(), evt.getY()))
           {
@@ -199,7 +200,8 @@ public class OverviewPanel extends JPanel implements Runnable,
       }
     });
 
-    // updateOverviewImage();
+    setPreferredSize(new Dimension(od.getWidth(),
+            od.getHeight()));
   }
 
   /*
@@ -271,7 +273,7 @@ public class OverviewPanel extends JPanel implements Runnable,
     }
     
     setPreferredSize(new Dimension(od.getWidth(),
-            od.getHeight()));
+            od.getHeight() + progressPanel.getHeight()));
 
     if (oviewCanvas.restartDraw())
     {