From 7a153c72e8f1f8ccad77452c64ab94fa774bd79a Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 21 Mar 2005 18:45:18 +0000 Subject: [PATCH] hide idwidthadjuster if wrapped --- src/jalview/gui/AlignmentPanel.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 76fc8d5..ac0862e 100755 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -21,6 +21,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene OverviewPanel overviewPanel; SeqPanel seqPanel; IdPanel idPanel; + IdwidthAdjuster idwidthAdjuster; SecondaryStructurePanel ssPanel; public AlignFrame alignFrame; ScalePanel scalePanel; @@ -40,8 +41,8 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene secondaryPanelHolder.add(ssPanel, BorderLayout.CENTER); idPanelHolder.add(idPanel, BorderLayout.CENTER); - IdwidthAdjuster iap = new IdwidthAdjuster(this); - idSpaceFillerPanel1.add(iap, BorderLayout.CENTER); + idwidthAdjuster = new IdwidthAdjuster(this); + idSpaceFillerPanel1.add(idwidthAdjuster, BorderLayout.CENTER); Dimension d = calculateIdWidth(); d.setSize( d.width+4, d.height); @@ -60,6 +61,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene { public void componentResized(ComponentEvent evt) { + if(seqPanel.getWidth()>0 && seqPanel.getHeight()>0) RefreshPanels(); } }); @@ -188,6 +190,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene hscroll.setVisible(!wrap); + idwidthAdjuster.setVisible(!wrap); idSpaceFillerPanel.setVisible(!wrap); idSpaceFillerPanel1.setVisible(!wrap); -- 1.7.10.2