<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" sourcepath="/clustengine/webservices"/>
- <classpathentry kind="lib" path="lib/Jmol-12.1.11_dev_patched.jar"/>
+ <classpathentry kind="lib" path="lib/Jmol-12.1.11_dev.jar"/>
+ <classpathentry kind="lib" path="appletlib/JmolApplet-12.1.11_dev.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>
<property name="packageDir" value="dist" />
<property name="outputJar" value="jalview.jar" />
<!-- Jalview Applet JMol Jar Dependency -->
- <property name="jmolJar" value="JmolApplet-12.1.11_dev_patched.jar" />
+ <property name="jmolJar" value="JmolApplet-12.1.11_dev.jar" />
<property name="jalviewLiteJar" value="jalviewApplet.jar"/>
<!-- switch to indicate if we should obfuscate jalviewLite -->
<!--<property name="donotobfuscate" value="true"/> -->
coloursMenu.add(user);
helpMenu.add(jmolHelp);
+ this.setLayout(new BorderLayout());
setMenuBar(menuBar);
renderPanel = new RenderPanel();
embedMenuIfNeeded(renderPanel);
this.add(renderPanel, BorderLayout.CENTER);
+ scriptWindow = new Panel();
+ scriptWindow.setVisible(false);
+ // this.add(scriptWindow, BorderLayout.SOUTH);
+
try
{
jmb.allocateViewer(renderPanel, true, ap.av.applet.getName()+"_jmol_",
ap.av.applet.getDocumentBase(), ap.av.applet.getCodeBase(),
- "-applet");
+ "-applet", scriptWindow, null);
} catch (Exception e)
{
System.err
{
}
}
-
+ Panel splitPane=null;
public void showConsole(boolean showConsole)
{
- if (scriptWindow == null)
+ if (showConsole)
{
- scriptWindow = new Panel(new BorderLayout());
- inputLine = new TextField();
- history = new TextArea(5, 40);
- scriptWindow.add(history, BorderLayout.CENTER);
- scriptWindow.add(inputLine, BorderLayout.SOUTH);
- add(scriptWindow, BorderLayout.SOUTH);
+ remove(renderPanel);
+ splitPane = new Panel();
+
+ splitPane.setLayout(new java.awt.GridLayout(2,1));
+ splitPane.add(renderPanel);
+ splitPane.add(scriptWindow);
+ scriptWindow.setVisible(true);
+ this.add(splitPane, BorderLayout.CENTER);
+ splitPane.setVisible(true);
+ splitPane.validate();
+ } else {
scriptWindow.setVisible(false);
- history.setEditable(false);
- inputLine.addKeyListener(this);
+ remove(splitPane);
+ add(renderPanel, BorderLayout.CENTER);
+ splitPane=null;
}
-
- scriptWindow.setVisible(!scriptWindow.isVisible());
validate();
}
import org.jmol.api.JmolAppConsoleInterface;
import org.jmol.api.JmolViewer;
+import org.jmol.applet.AppletConsole;
import org.jmol.popup.JmolPopup;
class AppletJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
protected JmolAppConsoleInterface createJmolConsole(JmolViewer viewer2,
Container consolePanel, String buttonsToShow)
{
- // TODO Auto-generated method stub
- return null;
+ return new AppletConsole(viewer2, consolePanel);
}
}
\ No newline at end of file
import jalview.schemes.*;
public abstract class JalviewJmolBinding implements StructureListener,
- JmolStatusListener, SequenceStructureBinding, JmolSelectionListener
+ JmolStatusListener, SequenceStructureBinding, JmolSelectionListener, ComponentListener
{
/**
commandOptions, this);
console = createJmolConsole(viewer, consolePanel, buttonsToShow);
- if (console != null)
+ if (consolePanel != null)
{
- 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);
- }
+ consolePanel.addComponentListener(this);
+
+ }
- @Override
- public void sendConsoleEcho(String strEcho)
- {
- console.sendConsoleEcho(strEcho);
- }
+ }
- @Override
- public void sendConsoleMessage(String strInfo)
- {
- console.sendConsoleMessage(strInfo);
- }
+ protected abstract JmolAppConsoleInterface createJmolConsole(
+ JmolViewer viewer2, Container consolePanel, String buttonsToShow);
- @Override
- public void zap()
- {
- console.zap();
- }
+ protected org.jmol.api.JmolAppConsoleInterface console = null;
- @Override
- public void dispose()
- {
- console.dispose();
- }
+@Override
+public void componentResized(ComponentEvent e)
+{
+
+}
- });
- }
+@Override
+public void componentMoved(ComponentEvent e)
+{
+
+}
- }
+@Override
+public void componentShown(ComponentEvent e)
+{
+ showConsole(true);
+}
- protected abstract JmolAppConsoleInterface createJmolConsole(
- JmolViewer viewer2, Container consolePanel, String buttonsToShow);
+@Override
+public void componentHidden(ComponentEvent e)
+{
+ showConsole(false);
+}
- protected org.jmol.api.JmolAppConsoleInterface console = null;
public void setLoadingFromArchive(boolean loadingFromArchive)
{
bl.setHgap(0);
bl.setVgap(0);
scriptWindow = new JPanel(bl);
+ scriptWindow.setVisible(false);
};
-
jmb.allocateViewer(renderPanel, true, "", null, null, "", scriptWindow, null);
jmb.newJmolPopup(true, "Jmol", true);
jmb.evalStateCommand(command);
{
}
}
- public void showConsole(boolean showConsole)
+public void showConsole(boolean showConsole)
{
if (showConsole)
validate();
}
-
class RenderPanel extends JPanel
{
final Dimension currentSize = new Dimension();
package jalview.gui;
import java.awt.Container;
+import java.awt.event.ComponentEvent;
+import java.awt.event.ComponentListener;
+import java.awt.event.ContainerEvent;
+import java.awt.event.ContainerListener;
import java.util.BitSet;
import javax.swing.JPanel;
import org.jmol.popup.JmolPopup;
import org.openscience.jmol.app.jmolpanel.AppConsole;
-public class AppJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
+public class AppJmolBinding extends jalview.ext.jmol.JalviewJmolBinding
{
/**
protected JmolAppConsoleInterface createJmolConsole(JmolViewer viewer2,
Container consolePanel, String buttonsToShow)
{
- return new AppConsole(viewer, null, consolePanel, buttonsToShow);
+ return new AppConsole(viewer, consolePanel, buttonsToShow);
}
}
\ No newline at end of file
Object source = e.getSource();
if (source == closeButton)
{
- appJmol.showConsole(false);
+ // appJmol.showConsole(false);
}
else if (source == runButton)
{