From f2469e3ede414575d5e8cd510ed5c916095b55bf Mon Sep 17 00:00:00 2001 From: janengelhardt Date: Thu, 30 Jun 2011 16:54:40 +0200 Subject: [PATCH] Varna external frame bug solved Change-Id: Ie60149059d664fb63d6bd99d748c1f34c1b01703 --- src/jalview/gui/AppVarna.java | 24 ++++++------------------ src/jalview/gui/PopupMenu.java | 1 + 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/src/jalview/gui/AppVarna.java b/src/jalview/gui/AppVarna.java index 524ac82..7a1e206 100644 --- a/src/jalview/gui/AppVarna.java +++ b/src/jalview/gui/AppVarna.java @@ -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); } diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index 948f684..2ac304b 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -269,6 +269,7 @@ public class PopupMenu extends JPopupMenu break; } } + //TODO: make rnastrucF a bit more nice final String rnastrucF=rnastruc; menuItem = new JMenuItem(); -- 1.7.10.2