From: amwaterhouse Date: Wed, 18 Apr 2007 12:03:28 +0000 (+0000) Subject: checks for scrollbar height X-Git-Tag: Release_2_3~224 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=aaf102359fb79ae6c1ba888439cc37dc42b6b0a8;p=jalview.git checks for scrollbar height --- 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(