hide idwidthadjuster if wrapped
authoramwaterhouse <Andrew Waterhouse>
Mon, 21 Mar 2005 18:45:18 +0000 (18:45 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 21 Mar 2005 18:45:18 +0000 (18:45 +0000)
src/jalview/gui/AlignmentPanel.java

index 76fc8d5..ac0862e 100755 (executable)
@@ -21,6 +21,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene
   OverviewPanel overviewPanel;\r
   SeqPanel   seqPanel;\r
   IdPanel    idPanel;\r
+  IdwidthAdjuster idwidthAdjuster;\r
   SecondaryStructurePanel ssPanel;\r
   public AlignFrame alignFrame;\r
   ScalePanel scalePanel;\r
@@ -40,8 +41,8 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene
     secondaryPanelHolder.add(ssPanel, BorderLayout.CENTER);\r
 \r
     idPanelHolder.add(idPanel, BorderLayout.CENTER);\r
-    IdwidthAdjuster iap = new IdwidthAdjuster(this);\r
-    idSpaceFillerPanel1.add(iap, BorderLayout.CENTER);\r
+    idwidthAdjuster = new IdwidthAdjuster(this);\r
+    idSpaceFillerPanel1.add(idwidthAdjuster, BorderLayout.CENTER);\r
 \r
     Dimension d = calculateIdWidth();\r
     d.setSize( d.width+4, d.height);\r
@@ -60,6 +61,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene
    {\r
      public void componentResized(ComponentEvent evt)\r
      {\r
+       if(seqPanel.getWidth()>0 && seqPanel.getHeight()>0)\r
           RefreshPanels();\r
      }\r
    });\r
@@ -188,6 +190,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene
 \r
     hscroll.setVisible(!wrap);\r
 \r
+    idwidthAdjuster.setVisible(!wrap);\r
     idSpaceFillerPanel.setVisible(!wrap);\r
     idSpaceFillerPanel1.setVisible(!wrap);\r
 \r