JAL-676 JAL-1001 - simple menu item to access documentation for services without...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Tue, 28 Aug 2012 13:51:12 +0000 (14:51 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Tue, 28 Aug 2012 13:51:12 +0000 (14:51 +0100)
src/jalview/ws/jws2/SequenceAnnotationWSClient.java

index 06c5470..46c04e5 100644 (file)
@@ -201,6 +201,22 @@ public class SequenceAnnotationWSClient extends Jws2Client
         wsmenu.add(presetlist);
       }
 
+    } else {
+      aacons = new JMenuItem("View documentation");
+      if (service.docUrl!=null)
+      {
+        aacons.addActionListener(new ActionListener()
+        {
+          
+          @Override
+          public void actionPerformed(ActionEvent arg0)
+          {
+            Desktop.instance.showUrl(service.docUrl);
+          }
+        });
+        aacons.setToolTipText("<html>"+JvSwingUtils.wrapTooltip("View <a href=\""+service.docUrl+"\">"+service.docUrl+"</a>")+"</html>");
+        wsmenu.add(aacons);
+      }
     }
   }