From aaf102359fb79ae6c1ba888439cc37dc42b6b0a8 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 18 Apr 2007 12:03:28 +0000 Subject: [PATCH] checks for scrollbar height --- src/jalview/gui/AlignmentPanel.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 836d962..f6b56f9 100755 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -295,9 +295,12 @@ public class AlignmentPanel System.out.println("NEEDS FIXING"); } - int height = annotationPanel.adjustPanelHeight() + - hscroll.getPreferredSize().height; + int height = annotationPanel.adjustPanelHeight(); + if (hscroll.isVisible()) + { + height += hscroll.getPreferredSize().height; + } if (height > alignFrame.getHeight() / 2) { height = alignFrame.getHeight() / 2; @@ -306,8 +309,7 @@ public class AlignmentPanel hscroll.addNotify(); annotationScroller.setPreferredSize( - new Dimension(annotationScroller.getWidth(), - height + hscroll.getHeight())); + new Dimension(annotationScroller.getWidth(), height)); annotationSpaceFillerHolder.setPreferredSize(new Dimension( -- 1.7.10.2