Varna external frame bug solved
authorjanengelhardt <engelhardt87@googlemail.com>
Thu, 30 Jun 2011 14:54:40 +0000 (16:54 +0200)
committerjanengelhardt <engelhardt87@googlemail.com>
Mon, 25 Jul 2011 12:58:34 +0000 (14:58 +0200)
Change-Id: Ie60149059d664fb63d6bd99d748c1f34c1b01703

src/jalview/gui/AppVarna.java
src/jalview/gui/PopupMenu.java

index 524ac82..7a1e206 100644 (file)
@@ -49,14 +49,6 @@ public class AppVarna extends JInternalFrame implements InterfaceVARNAListener//
   VARNAPanel varnaPanel;
   
   String name;
-
-  //JSplitPane splitPane;
-
-  //RenderPanel renderPanel;
-
-  //AlignmentPanel ap;
-
-  //Vector atomsPicked = new Vector();
   
   /*public AppVarna(){
          vab = new AppVarnaBinding(); 
@@ -75,8 +67,8 @@ public class AppVarna extends JInternalFrame implements InterfaceVARNAListener//
          }
          rnaList.add(rna1);
          
-         //vab = new AppVarnaBinding(rnaList);
-         vab = new AppVarnaBinding(seq,struc);
+         vab = new AppVarnaBinding(rnaList);
+         //vab = new AppVarnaBinding(seq,struc);
          name=this.name;
          initVarna();    
   }
@@ -86,21 +78,17 @@ public class AppVarna extends JInternalFrame implements InterfaceVARNAListener//
          //vab.setFinishedInit(false);
          varnaPanel=vab.get_varnaPanel();
          setBackground(Color.white);
-         System.out.println("vp: "+vab.get_varnaPanel().getName());
-         //varnaPanel.setVisible(true);
          getContentPane().setLayout(new BorderLayout());
          getContentPane().add(varnaPanel, BorderLayout.CENTER);
-         setVisible(true);
+         
          varnaPanel.addVARNAListener(this);
-         jalview.gui.Desktop.addInternalFrame(this,name,getBounds().width, getBounds().height);  
+         jalview.gui.Desktop.addInternalFrame(this,name,getBounds().width, getBounds().height);
+         this.pack();
+         this.setVisible(true);
          //showPanel(true);
   }
   
   public void showPanel(boolean show){
-         //vab.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-         //vab.pack();
-         //vab.setVisible(show);
-           
          varnaPanel.setVisible(show);
   }
   
index 948f684..2ac304b 100644 (file)
@@ -269,6 +269,7 @@ public class PopupMenu extends JPopupMenu
                          break;
                  }
          }
+
          //TODO: make rnastrucF a bit more nice
          final String rnastrucF=rnastruc;
          menuItem = new JMenuItem();