<classpathentry kind="lib" path="lib/castor-1.1-cycle-xml.jar" sourcepath="C:/Documents and Settings/JimP/workspace-3.3/castor/src/main/java"/>
<classpathentry kind="lib" path="lib/JGoogleAnalytics-0.2.1-SNAPSHOT.jar" sourcepath="/JGoogleAnalytics/src/main/java"/>
<classpathentry kind="lib" path="lib/vamsas-client.jar"/>
- <classpathentry kind="lib" path="lib/min-jaba-client.jar"/>
- <classpathentry kind="lib" path="lib/Jmol-12.1.5.jar" sourcepath="D:/InstallsDir/Sources for Development/jmol-12.1.5"/>
- <classpathentry kind="lib" path="appletlib/JmolApplet-12.1.5.jar" sourcepath="D:/InstallsDir/Sources for Development/jmol-12.1.5"/>
+ <classpathentry kind="lib" path="lib/min-jaba-client.jar" sourcepath="/clustengine/webservices"/>
+ <classpathentry kind="lib" path="lib/Jmol-12.1.11_dev_patched.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>
}
+ @Override
+ public void showConsole(boolean show)
+ {
+ appletJmolBinding.showConsole(show);
+ }
+
}
\ No newline at end of file
pdbentry[pe] = (PDBEntry) pdbe.elementAt(pe);
}
}
+
+ @Override
+ public void showConsole(boolean show)
+ {
+ // This never gets called because we haven't overriden the associated Jmol's console
+ System.err.println("WARNING: unexpected call to ExtJmol's showConsole method. (showConsole="+show);
+ }
}
import java.awt.*;
import java.awt.event.*;
+import javax.swing.JPanel;
+
import jalview.api.FeatureRenderer;
import jalview.api.SequenceRenderer;
import jalview.api.SequenceStructureBinding;
import org.jmol.popup.*;
import org.jmol.viewer.JmolConstants;
+import org.jmol.viewer.Viewer;
+import org.openscience.jmol.app.jmolpanel.AppConsole;
import jalview.schemes.*;
case JmolConstants.CALLBACK_MEASURE:
case JmolConstants.CALLBACK_CLICK:
-
default:
System.err.println("Unhandled callback " + type + " "
+ data[1].toString());
public abstract void refreshGUI();
/**
+ * called to show or hide the associated console window container.
+ * @param show
+ */
+ public abstract void showConsole(boolean show);
+ /**
* @param renderPanel
* @param jmolfileio
* - when true will initialise jmol's file IO system (should be false
String htmlName, URL documentBase, URL codeBase,
String commandOptions)
{
- viewer = JmolViewer.allocateViewer(renderPanel,
+ allocateViewer(renderPanel, jmolfileio, htmlName, documentBase, codeBase, commandOptions, null,null);
+ }
+ /**
+ *
+ * @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
+ * @param consolePanel - panel to contain Jmol console
+ * @param buttonsToShow - buttons to show on the console, in ordr
+ */
+ public void allocateViewer(Component renderPanel, boolean jmolfileio,
+ String htmlName, URL documentBase, URL codeBase,
+ String commandOptions, final Container consolePanel, String buttonsToShow)
+ {
+ viewer = JmolViewer.allocateViewer(renderPanel,
(jmolfileio ? new SmarterJmolAdapter() : null), htmlName
+ ((Object) this).toString(), documentBase, codeBase,
commandOptions, this);
+ console = new AppConsole(viewer, null, consolePanel,
+ buttonsToShow);
+ viewer.setConsole(new JmolAppConsoleInterface() {
+
+ @Override
+ public JmolScriptEditorInterface getScriptEditor()
+ {
+ return console.getScriptEditor();
+ }
+
+ @Override
+ public JmolAppConsoleInterface getAppConsole(Viewer viewer,
+ Component display)
+ {
+ return console;
+ }
+
+ public String getText()
+ {
+ return console.getText();
+ }
+
+ @Override
+ public Object getMyMenuBar()
+ {
+ return console.getMyMenuBar();
+ }
+
+ @Override
+ public void setVisible(boolean b)
+ {
+ showConsole(b);
+ }
+
+ @Override
+ public void sendConsoleEcho(String strEcho)
+ {
+ console.sendConsoleEcho(strEcho);
+
+ }
+
+ @Override
+ public void sendConsoleMessage(String strInfo)
+ {
+ console.sendConsoleMessage(strInfo);
+ }
+
+ @Override
+ public void zap()
+ {
+ console.zap();
+ }
+
+ @Override
+ public void dispose()
+ {
+ console.dispose();
+ }
+
+
+ });
+
+
}
+
+ protected org.jmol.api.JmolAppConsoleInterface console = null;
public void setLoadingFromArchive(boolean loadingFromArchive)
{
import org.jmol.adapter.smarter.SmarterJmolAdapter;
import org.jmol.popup.*;
import org.jmol.viewer.JmolConstants;
+import org.openscience.jmol.app.jmolpanel.AppConsole;
public class AppJmol extends GStructureViewer implements Runnable,
SequenceStructureBinding
{
AppJmolBinding jmb;
- ScriptWindow scriptWindow;
-
+ JPanel scriptWindow;
+
JSplitPane splitPane;
RenderPanel renderPanel;
this.getContentPane().add(renderPanel, java.awt.BorderLayout.CENTER);
jalview.gui.Desktop.addInternalFrame(this, jmb.getViewerTitle(),
getBounds().width, getBounds().height);
- jmb.allocateViewer(renderPanel, true, "", null, null, "");
+ if (scriptWindow == null)
+ {
+ BorderLayout bl = new BorderLayout();
+ bl.setHgap(0);
+ bl.setVgap(0);
+ scriptWindow = new JPanel(bl);
+ };
+
+ jmb.allocateViewer(renderPanel, true, "", null, null, "", scriptWindow, null);
jmb.newJmolPopup(true, "Jmol", true);
jmb.evalStateCommand(command);
jmb.setFinishedInit(true);
{
}
}
-
public void showConsole(boolean showConsole)
{
- if (scriptWindow == null)
- scriptWindow = new ScriptWindow(this);
if (showConsole)
{
splitPane.setTopComponent(renderPanel);
splitPane.setBottomComponent(scriptWindow);
this.getContentPane().add(splitPane, BorderLayout.CENTER);
+ splitPane.setDividerLocation(getHeight() - 200);
+ scriptWindow.setVisible(true);
+ scriptWindow.validate();
+ splitPane.validate();
}
- splitPane.setDividerLocation(getHeight() - 200);
- splitPane.validate();
}
else
{
if (splitPane != null)
- splitPane.setVisible(false);
+ {
+ splitPane.setVisible(false);
+ }
splitPane = null;
import java.util.BitSet;
+import javax.swing.JPanel;
+
import jalview.bin.Cache;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.SequenceI;
import org.jmol.popup.JmolPopup;
+import org.openscience.jmol.app.jmolpanel.AppConsole;
public class AppJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
{
public void sendConsoleEcho(String strEcho)
{
- if (appJmolWindow.scriptWindow != null)
+ if (console != null)
{
- appJmolWindow.scriptWindow.sendConsoleEcho(strEcho);
+ console.sendConsoleEcho(strEcho);
}
}
public void sendConsoleMessage(String strStatus)
{
- if (appJmolWindow.scriptWindow != null && strStatus != null)
+ if (console != null && strStatus != null)
// && !strStatus.equals("Script completed"))
// should we squash the script completed string ?
{
- appJmolWindow.scriptWindow.sendConsoleMessage(strStatus);
+ console.sendConsoleMessage(strStatus);
}
}
public void notifyScriptTermination(String strStatus, int msWalltime)
{
- if (appJmolWindow.scriptWindow != null)
- appJmolWindow.scriptWindow.notifyScriptTermination(strStatus,
- msWalltime);
+ // todo - script termination doesn't happen ?
+ //if (console != null)
+ //console.notifyScriptTermination(strStatus,
+ // msWalltime);
}
public void showUrl(String url)
}
+ public void showConsole(boolean b) {
+ appJmolWindow.showConsole(b);
+ }
/**
* add the given sequences to the mapping scope for the given pdb file handle
}
}
}
-
}
\ No newline at end of file