From cfa90577b4ddcb2e163a9bac0b2786d45de57933 Mon Sep 17 00:00:00 2001 From: kiramt Date: Wed, 9 Aug 2017 12:14:57 +0100 Subject: [PATCH] JAL-2587 Adjusting height for progress bar --- src/jalview/gui/OverviewCanvas.java | 9 ++++----- src/jalview/gui/OverviewPanel.java | 8 +++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/jalview/gui/OverviewCanvas.java b/src/jalview/gui/OverviewCanvas.java index 536301e..e49fd19 100644 --- a/src/jalview/gui/OverviewCanvas.java +++ b/src/jalview/gui/OverviewCanvas.java @@ -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()); } diff --git a/src/jalview/gui/OverviewPanel.java b/src/jalview/gui/OverviewPanel.java index ef064f4..4a0fadf 100755 --- a/src/jalview/gui/OverviewPanel.java +++ b/src/jalview/gui/OverviewPanel.java @@ -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()) { -- 1.7.10.2