org.jmol.console
Class JmolConsole

java.lang.Object
  extended by org.jmol.console.JmolConsole
All Implemented Interfaces:
ActionListener, WindowListener, EventListener, JmolCallbackListener
Direct Known Subclasses:
AppConsole, AppletConsole

public abstract class JmolConsole
extends Object
implements JmolCallbackListener, ActionListener, WindowListener


Nested Class Summary
protected  class JmolConsole.FileChecker
           
 
Field Summary
protected  String defaultMessage
           
protected  JButton editButton
           
protected  Container externalContainer
           
protected  JButton historyButton
           
private  String incompleteCmd
           
protected  JLabel label1
           
protected  Map<String,String> labels
           
protected  Map<String,AbstractButton> menuMap
           
 int nTab
           
protected  JButton runButton
           
protected  ScriptEditor scriptEditor
           
protected  JButton stateButton
           
 JmolViewer viewer
           
protected  JFrame viewerFrame
           
 
Constructor Summary
JmolConsole()
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
protected  void addWindowListener()
           
protected abstract  void clearContent(String text)
           
protected  String completeCommand(String thisCmd)
           
private  void destroyConsole()
           
 void dispose()
           
protected abstract  void execute(String strCommand)
           
protected  String getLabel(String key)
           
protected  Container getPane()
           
 JmolScriptEditorInterface getScriptEditor()
           
abstract  String getText()
           
static Window getWindow(Container p)
           
private  String nextFileName(String stub, int nTab)
           
 void notifyCallback(EnumCallback type, Object[] data)
           
 boolean notifyEnabled(EnumCallback type)
           
abstract  void sendConsoleEcho(String info)
           
abstract  void sendConsoleMessage(String info)
           
protected  JButton setButton(String s)
           
 void setCallbackFunction(String callbackType, String callbackFunction)
           
protected  void setEnabled(JButton button, boolean TF)
           
(package private)  void setScriptEditor(ScriptEditor se)
           
protected  void setTitle()
           
protected abstract  void setupLabels()
           
 void setVisible(boolean isVisible)
           
protected  void updateLabels()
           
 void windowActivated(WindowEvent we)
           
 void windowClosed(WindowEvent we)
           
 void windowClosing(WindowEvent we)
           
 void windowDeactivated(WindowEvent we)
           
 void windowDeiconified(WindowEvent we)
           
 void windowIconified(WindowEvent we)
           
 void windowOpened(WindowEvent we)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewer

public JmolViewer viewer

viewerFrame

protected JFrame viewerFrame

externalContainer

protected Container externalContainer

editButton

protected JButton editButton

runButton

protected JButton runButton

historyButton

protected JButton historyButton

stateButton

protected JButton stateButton

labels

protected Map<String,String> labels

menuMap

protected Map<String,AbstractButton> menuMap

scriptEditor

protected ScriptEditor scriptEditor

nTab

public int nTab

incompleteCmd

private String incompleteCmd

defaultMessage

protected String defaultMessage

label1

protected JLabel label1
Constructor Detail

JmolConsole

public JmolConsole()
Method Detail

setupLabels

protected abstract void setupLabels()

dispose

public void dispose()

getPane

protected Container getPane()

getLabel

protected String getLabel(String key)

setTitle

protected void setTitle()

setVisible

public void setVisible(boolean isVisible)

setScriptEditor

void setScriptEditor(ScriptEditor se)

getScriptEditor

public JmolScriptEditorInterface getScriptEditor()

clearContent

protected abstract void clearContent(String text)

execute

protected abstract void execute(String strCommand)

getText

public abstract String getText()

completeCommand

protected String completeCommand(String thisCmd)

nextFileName

private String nextFileName(String stub,
                            int nTab)

setEnabled

protected void setEnabled(JButton button,
                          boolean TF)

setButton

protected JButton setButton(String s)

updateLabels

protected void updateLabels()

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

addWindowListener

protected void addWindowListener()

windowActivated

public void windowActivated(WindowEvent we)
Specified by:
windowActivated in interface WindowListener
Parameters:
we -

windowClosed

public void windowClosed(WindowEvent we)
Specified by:
windowClosed in interface WindowListener

windowClosing

public void windowClosing(WindowEvent we)
Specified by:
windowClosing in interface WindowListener

destroyConsole

private void destroyConsole()

windowDeactivated

public void windowDeactivated(WindowEvent we)
Specified by:
windowDeactivated in interface WindowListener
Parameters:
we -

windowDeiconified

public void windowDeiconified(WindowEvent we)
Specified by:
windowDeiconified in interface WindowListener
Parameters:
we -

windowIconified

public void windowIconified(WindowEvent we)
Specified by:
windowIconified in interface WindowListener
Parameters:
we -

windowOpened

public void windowOpened(WindowEvent we)
Specified by:
windowOpened in interface WindowListener
Parameters:
we -

notifyEnabled

public boolean notifyEnabled(EnumCallback type)
Specified by:
notifyEnabled in interface JmolCallbackListener

sendConsoleMessage

public abstract void sendConsoleMessage(String info)

sendConsoleEcho

public abstract void sendConsoleEcho(String info)

notifyCallback

public void notifyCallback(EnumCallback type,
                           Object[] data)
Specified by:
notifyCallback in interface JmolCallbackListener

setCallbackFunction

public void setCallbackFunction(String callbackType,
                                String callbackFunction)
Specified by:
setCallbackFunction in interface JmolCallbackListener

getWindow

public static Window getWindow(Container p)
Parameters:
p -
Returns:
The hosting frame or JDialog.