new interface
authorjprocter <Jim Procter>
Thu, 1 Apr 2010 14:18:19 +0000 (14:18 +0000)
committerjprocter <Jim Procter>
Thu, 1 Apr 2010 14:18:19 +0000 (14:18 +0000)
src/jalview/ws/WSClient.java
src/jalview/ws/WSMenuEntryProviderI.java [new file with mode: 0644]

index fdeb01b..5c9164c 100755 (executable)
@@ -23,7 +23,7 @@ import javax.swing.JMenu;
 import ext.vamsas.*;
 import jalview.gui.*;
 
-public abstract class WSClient
+public abstract class WSClient implements WSMenuEntryProviderI
 {
   /**
    * WSClient holds the basic attributes that are displayed to the user for all
diff --git a/src/jalview/ws/WSMenuEntryProviderI.java b/src/jalview/ws/WSMenuEntryProviderI.java
new file mode 100644 (file)
index 0000000..49afb91
--- /dev/null
@@ -0,0 +1,19 @@
+package jalview.ws;
+
+import jalview.gui.AlignFrame;
+
+import javax.swing.JMenu;
+
+public interface WSMenuEntryProviderI
+{
+  /**
+   * Called by the AlignFrame web service menu constructor to enable a service
+   * instance to add menu entries.
+   * 
+   * @param wsmenu
+   *          the menu to which any menu entries/sub menus are to be attached
+   * @param alignFrame
+   *          the alignFrame instance that provides input data for the service
+   */
+  public void attachWSMenuEntry(JMenu wsmenu, final AlignFrame alignFrame);
+}