X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FScriptWindow.java;h=8e6958432742771fe9616ece51861524df8fd41b;hb=3a2a5c2d6ae1e0aeeced5d11d6f9ffd5fafaa147;hp=a3a3f424cee483234d060642a31990e5a3d73764;hpb=ea1bc94cb0d4ea4b877101cb7d93283ed4a199fe;p=jalview.git diff --git a/src/jalview/gui/ScriptWindow.java b/src/jalview/gui/ScriptWindow.java index a3a3f42..8e69584 100644 --- a/src/jalview/gui/ScriptWindow.java +++ b/src/jalview/gui/ScriptWindow.java @@ -40,7 +40,7 @@ import org.jmol.i18n.GT; import org.jmol.util.Logger; import org.jmol.util.CommandHistory; -public final class ScriptWindow extends JInternalFrame +public final class ScriptWindow extends JPanel implements ActionListener, EnterListener{ private ConsoleTextPane console; @@ -50,32 +50,33 @@ public final class ScriptWindow extends JInternalFrame private JButton clearButton; private JButton historyButton; private JButton stateButton; - private JButton helpButton; - JmolViewer viewer; + JmolViewer viewer; + AppJmol appJmol; - public ScriptWindow(JmolViewer viewer) + public ScriptWindow(AppJmol appJmol) { - this.viewer = viewer; + this.viewer = appJmol.viewer; + this.appJmol = appJmol; + - getContentPane().setLayout(new BorderLayout()); + setLayout(new BorderLayout()); console = new ConsoleTextPane(this); console.setPrompt(); - getContentPane().add(new JScrollPane(console) + add(new JScrollPane(console) , BorderLayout.CENTER); JPanel buttonPanel = new JPanel(); - getContentPane().add(buttonPanel, BorderLayout.SOUTH); + add(buttonPanel, BorderLayout.SOUTH); runButton = new JButton(GT._("Run")); - runButton.addActionListener(this); - buttonPanel.add(runButton); - haltButton = new JButton(GT._("Halt")); + runButton.addActionListener(this); + // buttonPanel.add(runButton); haltButton.addActionListener(this); - buttonPanel.add(haltButton); + // buttonPanel.add(haltButton); haltButton.setEnabled(false); clearButton = new JButton(GT._("Clear")); @@ -90,14 +91,16 @@ public final class ScriptWindow extends JInternalFrame stateButton.addActionListener(this); buttonPanel.add(stateButton); - helpButton = new JButton(GT._("Help")); - helpButton.addActionListener(this); - buttonPanel.add(helpButton); - closeButton = new JButton(GT._("Close")); closeButton.addActionListener(this); buttonPanel.add(closeButton); + for(int i=0; i