Eric, take a look at the sync code in the Applet.Jmol.java and 
Viewer.Viewer.java

This was a bit of an experiment that I decided not to do anything more 
with, but in the Java of bob200603 it's still there:

StatusManager.java:

  public void syncSend(String script, String appletName) {
    if (jmolStatusListener != null)
      jmolStatusListener.sendSyncScript(script, appletName);
  }
 

Jmol.java (applet):

    public void sendSyncScript(String script, String appletName) {
      Hashtable h = JmolAppletRegistry.htRegistry;
      Enumeration keys = h.keys();
      while (keys.hasMoreElements()) {
        String theApplet = (String)keys.nextElement();
        if (! theApplet.equals(htmlName) &&
            (appletName == null || appletName == theApplet)) {
          System.out.println("sendSyncScript class 
"+h.get(theApplet).getClass().getName());
          JmolAppletInterface app = (JmolAppletInterface)(h.get(theApplet));
          try {
            System.out.println(htmlName + " sending " + script + " to " 
+ theApplet);
            app.syncScript(script);
          } catch (Exception e) {
            System.out.println(htmlName + " couldn't send " + script + " 
to " + theApplet + ": " + e);
          }
        }
      }
    }


The trick here is that the two applets are registered with the same 
STATIC object. Can you do that with two objects that aren't identical? 
Or does this have to be two Jmol applets?

Bob




Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to