// remove listeners for all structures in viewer
getSsm().removeStructureViewerListener(this, this.getStructureFiles());
if (viewer != null)
+ {
viewer.dispose();
+ }
lastCommand = null;
viewer = null;
releaseUIResources();
}
Thread colourby = null;
+
/**
* Sends a set of colour commands to the structure viewer
*
colourby.interrupt();
colourby = null;
}
- colourby = new Thread(new Runnable()
+ Thread colourby = new Thread(new Runnable()
{
@Override
public void run()
}
});
colourby.start();
+ this.colourby = colourby;
}
/**
// see JAL-623 - need method of matching pasted data up
{
pdb = getSsm().setMapping(getSequence()[pe], getChains()[pe],
- pdbfile, DataSourceType.PASTE,
- getIProgressIndicator());
+ pdbfile, DataSourceType.PASTE, getIProgressIndicator());
getPdbEntry(modelnum).setFile("INLINE" + pdb.getId());
matches = true;
foundEntry = true;
public void showHelp()
{
showUrl("http://wiki.jmol.org"
- // BH 2018 "http://jmol.sourceforge.net/docs/JmolUserGuide/"
- , "jmolHelp");
+ // BH 2018 "http://jmol.sourceforge.net/docs/JmolUserGuide/"
+ , "jmolHelp");
}
/**
*/
public abstract void showConsole(boolean show);
-
public static Viewer getJmolData(JmolParser jmolParser)
{
return (Viewer) JmolViewer.allocateViewer(null, null, null, null, null,
String commandOptions, final Container consolePanel,
String buttonsToShow)
{
-
+
System.err.println("Allocating Jmol Viewer: " + commandOptions);
-
+
if (commandOptions == null)
{
commandOptions = "";
viewer.setJmolStatusListener(this); // extends JmolCallbackListener
- try {
+ try
+ {
console = createJmolConsole(consolePanel, buttonsToShow);
- } catch (Throwable e) {
- System.err.println("Could not create Jmol application console. " + e.getMessage());
+ } catch (Throwable e)
+ {
+ System.err.println("Could not create Jmol application console. "
+ + e.getMessage());
e.printStackTrace();
}
if (consolePanel != null)
protected abstract JmolAppConsoleInterface createJmolConsole(
Container consolePanel, String buttonsToShow);
- // BH 2018 -- Jmol console is not working due to problems with styled documents.
-
+ // BH 2018 -- Jmol console is not working due to problems with styled
+ // documents.
protected org.jmol.api.JmolAppConsoleInterface console = null;
public void setBackgroundColour(java.awt.Color col)
{
jmolHistory(false);
- jmolScript("background [" + col.getRed() + ","
- + col.getGreen() + "," + col.getBlue() + "];");
+ jmolScript("background [" + col.getRed() + "," + col.getGreen() + ","
+ + col.getBlue() + "];");
jmolHistory(true);
}
private String jmolScript(String script)
{
-
+
System.err.println(">>Jmol>> " + script);
-
+
String s = viewer.scriptWait(script);
-
+
System.err.println("<<Jmol<< " + s);
-
+
return s;
}