this.add(renderPanel, BorderLayout.CENTER);
try
{
- jmb.allocateViewer(renderPanel, "jalviewJmol",
+ jmb.allocateViewer(renderPanel, true, ap.av.applet.getName()+"_jmol_",
ap.av.applet.getDocumentBase(), ap.av.applet.getCodeBase(),
- "");
+ "-applet");
} catch (Exception e)
{
System.err
import java.io.File;
import java.net.URL;
import java.util.*;
+import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
return modelFileNames;
}
- public Hashtable getRegistryInfo()
+ /**
+ * map from string to applet
+ */
+ public Map getRegistryInfo()
{
// TODO Auto-generated method stub
return null;
*/
public abstract void refreshGUI();
- public void allocateViewer(Component renderPanel, String htmlName,
+
+ /**
+ * @param renderPanel
+ * @param jmolfileio - when true will initialise jmol's file IO system (should be false in applet context)
+ * @param htmlName
+ * @param documentBase
+ * @param codeBase
+ * @param commandOptions
+ */
+ public void allocateViewer(Component renderPanel, boolean jmolfileio, String htmlName,
URL documentBase, URL codeBase, String commandOptions)
{
viewer = JmolViewer.allocateViewer(renderPanel,
- new SmarterJmolAdapter(),
+ (jmolfileio ? new SmarterJmolAdapter() : null),
htmlName + ((Object) this).toString(), documentBase, codeBase,
commandOptions, this);
}