*/
public abstract void showConsole(boolean show);
+
+ public static Viewer getJmolData(JmolParser jmolParser)
+ {
+ return (Viewer) JmolViewer.allocateViewer(null, null, null, null, null,
+ "-x -o -n", jmolParser);
+ }
+
/**
+ *
+ *
+ *
* @param renderPanel
* @param jmolfileio
* - when true will initialise jmol's file IO system (should be false
* @param consolePanel
* - panel to contain Jmol console
* @param buttonsToShow
- * - buttons to show on the console, in ordr
+ * - buttons to show on the console, in order
*/
public void allocateViewer(Container renderPanel, boolean jmolfileio,
String htmlName, URL documentBase, URL codeBase,
String commandOptions, final Container consolePanel,
String buttonsToShow)
{
+
+ System.err.println("Allocating Jmol Viewer: " + commandOptions);
+
if (commandOptions == null)
{
commandOptions = "";
viewer.setJmolStatusListener(this); // extends JmolCallbackListener
- console = null;//createJmolConsole(consolePanel, buttonsToShow);
+ try {
+ console = createJmolConsole(consolePanel, buttonsToShow);
+ } catch (Throwable e) {
+ System.err.println("Could not create Jmol application console. " + e.getMessage());
+ e.printStackTrace();
+ }
if (consolePanel != null)
{
consolePanel.addComponentListener(this);
protected abstract JmolAppConsoleInterface createJmolConsole(
Container consolePanel, String buttonsToShow);
+ // BH 2018 -- Jmol console is not working due to problems with styled documents.
+
+
protected org.jmol.api.JmolAppConsoleInterface console = null;
@Override
private String jmolScript(String script)
{
- return viewer.scriptWait(script);
+
+ System.err.println(">>Jmol>> " + script);
+
+ String s = viewer.scriptWait(script);
+
+ System.err.println("<<Jmol<< " + s);
+
+ return s;
}
@Override
{
showConsole(false);
}
+
}