Revision: 20421
          http://sourceforge.net/p/jmol/code/20421
Author:   hansonr
Date:     2015-03-31 13:03:13 +0000 (Tue, 31 Mar 2015)
Log Message:
-----------
adds Jmol._Applet._appletPanel as a handler for Jmol._Applet._applet, 
specifically for handling special Jmol events.

Modified Paths:
--------------
    trunk/Jmol/src/javajs/api/JSInterface.java
    trunk/Jmol/src/org/jmol/appletjs/Jmol.java

Modified: trunk/Jmol/src/javajs/api/JSInterface.java
===================================================================
--- trunk/Jmol/src/javajs/api/JSInterface.java  2015-03-31 12:24:18 UTC (rev 
20420)
+++ trunk/Jmol/src/javajs/api/JSInterface.java  2015-03-31 13:03:13 UTC (rev 
20421)
@@ -11,10 +11,7 @@
   int cacheFileByName(String fileName, boolean isAdd);
   void cachePut(String key, Object data);
   void destroy();
-  Object getGLmolView();
   String getFullName();
-  String loadInlineString(String mol, String script, boolean isAppend);
-  String openFile(String fileName);
   void openFileAsyncSpecial(String fileName, int flags);
   boolean processMouseEvent(int id, int x, int y, int modifiers, long time);
   void processTwoPointGesture(float[][][] touches);
@@ -23,6 +20,11 @@
   boolean setStatusDragDropped(int mode, int x, int y, String fileName);
        void startHoverWatcher(boolean enable);
        void update();
-               
+
+       // these are not general methods
+//Object getGLmolView();
+//String loadInlineString(String mol, String script, boolean isAppend);
+//String openFile(String fileName);
+
 }
 

Modified: trunk/Jmol/src/org/jmol/appletjs/Jmol.java
===================================================================
--- trunk/Jmol/src/org/jmol/appletjs/Jmol.java  2015-03-31 12:24:18 UTC (rev 
20420)
+++ trunk/Jmol/src/org/jmol/appletjs/Jmol.java  2015-03-31 13:03:13 UTC (rev 
20421)
@@ -265,6 +265,27 @@
     }
   }
 
+  /**
+   * This method is only called by JmolGLmol applet._refresh();
+   * 
+   * @return enough data to update a WebGL view
+   * 
+   */
+  public Object getGLmolView() {
+    return viewer.getGLmolView();
+  }
+
+  /**
+   * possibly called from JSmolApplet.js upon start up
+   *  
+   * @param fileName
+   * @return error or null
+   */
+  
+  public String openFile(String fileName) {
+    return viewer.openFile(fileName);
+  }
+
   // JSInterface -- methods called from JSmol JavaScript library
   
   @Override
@@ -278,11 +299,6 @@
   }
 
   @Override
-  public Object getGLmolView() {
-    return viewer.getGLmolView();
-  }
-
-  @Override
   public String getFullName() {
     return fullName;
   }
@@ -314,11 +330,6 @@
   }
 
   @Override
-  public String openFile(String fileName) {
-    return viewer.openFile(fileName);
-  }
-
-  @Override
   public void openFileAsyncSpecial(String fileName, int flags) {
     viewer.openFileAsyncSpecial(fileName, flags);
   }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to