From 93553a5ae71dd083fd4d504e5e5403505d3f0ca1 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 2 Apr 2007 11:16:53 +0000 Subject: [PATCH] Must allow for scrollbar height --- src/jalview/gui/AlignmentPanel.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index cdff8a3..6cd18ba 100755 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -81,8 +81,6 @@ public class AlignmentPanel annotationScroller.setViewportView(annotationPanel); annotationSpaceFillerHolder.add(alabels, BorderLayout.CENTER); - fontChanged(); - scalePanelHolder.add(scalePanel, BorderLayout.CENTER); seqPanelHolder.add(seqPanel, BorderLayout.CENTER); @@ -109,7 +107,7 @@ public class AlignmentPanel } }); - adjustAnnotationHeight(); + fontChanged(); } @@ -298,16 +296,20 @@ public class AlignmentPanel System.out.println("NEEDS FIXING"); } - int height = annotationPanel.adjustPanelHeight(); + int height = annotationPanel.adjustPanelHeight() + + hscroll.getPreferredSize().height; if (height > alignFrame.getHeight() / 2) { height = alignFrame.getHeight() / 2; } + hscroll.addNotify(); + annotationScroller.setPreferredSize( new Dimension(annotationScroller.getWidth(), - height)); + height + hscroll.getHeight())); + annotationSpaceFillerHolder.setPreferredSize(new Dimension( annotationSpaceFillerHolder.getWidth(), -- 1.7.10.2