From: amwaterhouse Date: Mon, 21 Mar 2005 18:45:18 +0000 (+0000) Subject: hide idwidthadjuster if wrapped X-Git-Tag: Release_2_0~538 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7a153c72e8f1f8ccad77452c64ab94fa774bd79a;p=jalview.git hide idwidthadjuster if wrapped --- 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);