From: janengelhardt Date: Sun, 26 Jun 2011 16:18:31 +0000 (+0200) Subject: Changed location of VARNAv3-8b.jar; small changes X-Git-Tag: Jalview_2_9~576^2~33 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c42398f840e2a6709c5ccc45f84de2a12011c90a;p=jalview.git Changed location of VARNAv3-8b.jar; small changes Change-Id: I0d0decfd5be63ff6a2a1962145671803bf23129f --- diff --git a/.classpath b/.classpath index b09d9ee..3324c5f 100644 --- a/.classpath +++ b/.classpath @@ -41,6 +41,6 @@ - + diff --git a/lib/VARNAv3-8b.jar b/lib/VARNAv3-8b.jar new file mode 100644 index 0000000..4d4b845 Binary files /dev/null and b/lib/VARNAv3-8b.jar differ diff --git a/src/jalview/gui/AppVarna.java b/src/jalview/gui/AppVarna.java index 19b19cd..be101d0 100644 --- a/src/jalview/gui/AppVarna.java +++ b/src/jalview/gui/AppVarna.java @@ -39,6 +39,8 @@ public class AppVarna extends JInternalFrame // implements Runnable,SequenceStru AppVarnaBinding vab; JPanel varnaPanel; + + String name; //JSplitPane splitPane; @@ -53,8 +55,9 @@ public class AppVarna extends JInternalFrame // implements Runnable,SequenceStru initVarna(); } - public AppVarna(String seq){ + public AppVarna(String seq,String name){ vab = new AppVarnaBinding(seq); + name=this.name; initVarna(); } @@ -62,7 +65,7 @@ public class AppVarna extends JInternalFrame // implements Runnable,SequenceStru //vab.setFinishedInit(false); varnaPanel=vab.vp; this.getContentPane().add(varnaPanel); - jalview.gui.Desktop.addInternalFrame(this,"test",200,200); + jalview.gui.Desktop.addInternalFrame(this,name,getBounds().width, getBounds().height); showPanel(true); } diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index 7db6c23..dcf745b 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -253,27 +253,30 @@ public class PopupMenu extends JPopupMenu } } else - { - //TODO: Something to check if it's an RNA - //like: if(seq.getAnnotation()[0].annotations[0].secondaryStructure == 'S') - final SequenceI seqI = seq.getDatasetSequence(); - - menuItem = new JMenuItem(); - menuItem.setText("RNA structure"); - menuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - System.out.println("Call Varna "+seqI.getSequenceAsString()); - new AppVarna(seqI.getSequenceAsString()); - - } - }); - viewStructureMenu.add(menuItem); - + { //JAN structureMenu.remove(viewStructureMenu); // structureMenu.remove(colStructureMenu); } + + //if(seq.getAnnotation()[0].annotations[0].secondaryStructure == 'S'){ + //TODO: Something to check if it's an RNA + //like: if(seq.getAnnotation()[0].annotations[0].secondaryStructure == 'S') + final SequenceI seqI = seq.getDatasetSequence(); + //ap.getAlignment().get + menuItem = new JMenuItem(); + menuItem.setText("RNA structure"); + menuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + System.out.println("Call Varna "+seqI.getSequenceAsString()+" "+seqI.getName()); + new AppVarna(seqI.getSequenceAsString(),seqI.getName()); + + } + }); + viewStructureMenu.add(menuItem); + //} + menuItem = new JMenuItem("Hide Sequences"); menuItem.addActionListener(new java.awt.event.ActionListener()