Parse id before showing uniprot link
authoramwaterhouse <Andrew Waterhouse>
Wed, 30 Nov 2005 15:07:09 +0000 (15:07 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 30 Nov 2005 15:07:09 +0000 (15:07 +0000)
src/jalview/appletgui/APopupMenu.java
src/jalview/appletgui/IdPanel.java

index 0435d25..8488dd8 100755 (executable)
@@ -97,8 +97,12 @@ public class APopupMenu
         link = links.elementAt(i).toString();\r
         final String target = link.substring(0, link.indexOf("|"));\r
         item = new MenuItem(target);\r
+        String id = seq.getName();\r
+        if(id.indexOf("|")>-1)\r
+             id = id.substring(id.lastIndexOf("|")+1);\r
+\r
         final String url = link.substring(link.indexOf("|")+1, link.indexOf("$SEQUENCE_ID$"))\r
-               + seq.getName() +\r
+               + id +\r
                link.substring(link.indexOf("$SEQUENCE_ID$") + 13);\r
 \r
            item.addActionListener(new java.awt.event.ActionListener()\r
index 82fc507..d159a4c 100755 (executable)
@@ -116,6 +116,8 @@ public class IdPanel
     //DEFAULT LINK IS FIRST IN THE LINK LIST\r
     int seq = av.getIndex(y);\r
     String id = av.getAlignment().getSequenceAt(seq).getName();\r
+    if (id.indexOf("|") > -1)\r
+        id = id.substring(id.lastIndexOf("|") + 1);\r
 \r
     String target = links.elementAt(0).toString();\r
     target = target.substring(0, target.indexOf("|"));\r