Changed location of VARNAv3-8b.jar; small changes
authorjanengelhardt <engelhardt87@googlemail.com>
Sun, 26 Jun 2011 16:18:31 +0000 (18:18 +0200)
committerjanengelhardt <engelhardt87@googlemail.com>
Mon, 25 Jul 2011 12:58:33 +0000 (14:58 +0200)
Change-Id: I0d0decfd5be63ff6a2a1962145671803bf23129f

.classpath
lib/VARNAv3-8b.jar [new file with mode: 0644]
src/jalview/gui/AppVarna.java
src/jalview/gui/PopupMenu.java

index b09d9ee..3324c5f 100644 (file)
@@ -41,6 +41,6 @@
        </classpathentry>
        <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin.jar"/>
        <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin.java"/>
-       <classpathentry kind="lib" path="/VARNAv3-8b/VARNAv3-8b.jar"/>
+       <classpathentry kind="lib" path="lib/VARNAv3-8b.jar"/>
        <classpathentry kind="output" path="classes"/>
 </classpath>
diff --git a/lib/VARNAv3-8b.jar b/lib/VARNAv3-8b.jar
new file mode 100644 (file)
index 0000000..4d4b845
Binary files /dev/null and b/lib/VARNAv3-8b.jar differ
index 19b19cd..be101d0 100644 (file)
@@ -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);
   }
   
index 7db6c23..dcf745b 100644 (file)
@@ -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()