JAL-3210 Improvements to eclipse detection. New src tree and SwingJS updated from...
[jalview.git] / src / jalview / bin / JalviewJSApi.java
diff --git a/src/jalview/bin/JalviewJSApi.java b/src/jalview/bin/JalviewJSApi.java
new file mode 100644 (file)
index 0000000..b1fed25
--- /dev/null
@@ -0,0 +1,52 @@
+package jalview.bin;
+
+import jalview.gui.AlignFrame;
+import jalview.javascript.JalviewLiteJsApi;
+
+/**
+ * JAL-3369 JalviewJS API BH 2019.07.17
+ * 
+ * @author hansonr
+ *
+ */
+public interface JalviewJSApi extends JalviewLiteJsApi
+{
+
+  void showOverview();
+
+  /**
+   * process commandline arguments after the JavaScript application has started
+   * 
+   * @param args
+   * @return
+   */
+  Object parseArguments(String[] args);
+
+
+  /**
+   * Open a new Tree panel on the desktop statically. Params are standard (not
+   * set by Groovy). No dialog is opened.
+   * 
+   * @param af
+   *          may be null
+   * @param treeType
+   * @param modelName
+   * @return null, or the string "label.you_need_at_least_n_sequences" if number
+   *         of sequences selected is inappropriate
+   */
+  public Object openTreePanel(AlignFrame af, String treeType,
+          String modelName);
+
+  /**
+   * public static method for JalviewJS API to open a PCAPanel without
+   * necessarily using a dialog.
+   * 
+   * @param af
+   *          may be null
+   * @param modelName
+   * @return the PCAPanel, or the string "label.you_need_at_least_n_sequences"
+   *         if number of sequences selected is inappropriate
+   */
+  public Object openPcaPanel(AlignFrame af, String modelName);
+
+}