org.jmol.console
Class AppletConsole

java.lang.Object
  extended by org.jmol.console.JmolConsole
      extended by org.jmol.console.AppletConsole
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.WindowListener, java.util.EventListener, JmolAppConsoleInterface, JmolCallbackListener

public class AppletConsole
extends JmolConsole
implements JmolAppConsoleInterface


Nested Class Summary
(package private)  class AppletConsole.ControlEnterTextArea
           
 
Nested classes/interfaces inherited from class org.jmol.console.JmolConsole
JmolConsole.FileChecker
 
Field Summary
private  javax.swing.text.SimpleAttributeSet attributesCommand
           
private  javax.swing.JButton clearInButton
           
private  javax.swing.JButton clearOutButton
           
protected  javax.swing.JTextArea input
           
private  javax.swing.JButton loadButton
           
private  javax.swing.JTextPane output
           
private  javax.swing.text.Document outputDocument
           
 
Fields inherited from class org.jmol.console.JmolConsole
defaultMessage, editButton, externalContainer, historyButton, label1, labels, menuMap, nTab, runButton, scriptEditor, stateButton, viewer, viewerFrame
 
Constructor Summary
  AppletConsole()
           
private AppletConsole(JmolViewer viewer, java.awt.Container externalContainer)
          general entry point
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
private  void addHelpItems(javax.swing.JMenu m0, java.lang.String key, java.lang.String attr)
           
protected  void addHelpMenuBar(javax.swing.JMenuBar menuBar)
           
protected  void clearContent(java.lang.String text)
           
protected  java.lang.String completeCommand(java.lang.String thisCmd)
           
protected  javax.swing.JMenuBar createMenubar()
           
protected  javax.swing.JMenuItem createMenuItem(java.lang.String cmd)
           
protected  void execute(java.lang.String strCommand)
           
 JmolAppConsoleInterface getAppConsole(JmolViewer viewer)
          don't delete! used by Viewer after it gets the class by name
 java.lang.String getText()
           
private  void layoutWindow()
           
private  void output(java.lang.String message)
           
private  void output(java.lang.String message, javax.swing.text.AttributeSet att)
           
 void sendConsoleEcho(java.lang.String strEcho)
           
 void sendConsoleMessage(java.lang.String strInfo)
           
private  void setLabels()
           
private  void setupInput()
           
protected  void setupLabels()
           
private  void setupOutput()
           
 void setVisible(boolean visible)
           
 void zap()
           
 
Methods inherited from class org.jmol.console.JmolConsole
addWindowListener, dispose, getLabel, getPane, getScriptEditor, getWindow, notifyCallback, notifyEnabled, setButton, setCallbackFunction, setEnabled, setScriptEditor, setTitle, updateLabels, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jmol.api.JmolAppConsoleInterface
dispose, getScriptEditor
 

Field Detail

input

protected final javax.swing.JTextArea input

clearOutButton

private javax.swing.JButton clearOutButton

clearInButton

private javax.swing.JButton clearInButton

loadButton

private javax.swing.JButton loadButton

output

private final javax.swing.JTextPane output

outputDocument

private final javax.swing.text.Document outputDocument

attributesCommand

private final javax.swing.text.SimpleAttributeSet attributesCommand
Constructor Detail

AppletConsole

private AppletConsole(JmolViewer viewer,
                      java.awt.Container externalContainer)
general entry point

Parameters:
viewer -
externalContainer - a JFrame or JPanel or null

AppletConsole

public AppletConsole()
Method Detail

getAppConsole

public JmolAppConsoleInterface getAppConsole(JmolViewer viewer)
don't delete! used by Viewer after it gets the class by name

Specified by:
getAppConsole in interface JmolAppConsoleInterface
Parameters:
viewer -
Returns:
AppletConsole

sendConsoleEcho

public void sendConsoleEcho(java.lang.String strEcho)
Specified by:
sendConsoleEcho in interface JmolAppConsoleInterface
Specified by:
sendConsoleEcho in class JmolConsole

sendConsoleMessage

public void sendConsoleMessage(java.lang.String strInfo)
Specified by:
sendConsoleMessage in interface JmolAppConsoleInterface
Specified by:
sendConsoleMessage in class JmolConsole

zap

public void zap()
Specified by:
zap in interface JmolAppConsoleInterface

layoutWindow

private void layoutWindow()

setLabels

private void setLabels()

setupLabels

protected void setupLabels()
Specified by:
setupLabels in class JmolConsole

createMenubar

protected javax.swing.JMenuBar createMenubar()

addHelpMenuBar

protected void addHelpMenuBar(javax.swing.JMenuBar menuBar)

addHelpItems

private void addHelpItems(javax.swing.JMenu m0,
                          java.lang.String key,
                          java.lang.String attr)

createMenuItem

protected javax.swing.JMenuItem createMenuItem(java.lang.String cmd)

setupInput

private void setupInput()

setupOutput

private void setupOutput()

setVisible

public void setVisible(boolean visible)
Specified by:
setVisible in interface JmolAppConsoleInterface
Overrides:
setVisible in class JmolConsole

output

private void output(java.lang.String message)

getText

public java.lang.String getText()
Specified by:
getText in interface JmolAppConsoleInterface
Specified by:
getText in class JmolConsole

output

private void output(java.lang.String message,
                    javax.swing.text.AttributeSet att)

clearContent

protected void clearContent(java.lang.String text)
Specified by:
clearContent in class JmolConsole

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class JmolConsole

execute

protected void execute(java.lang.String strCommand)
Specified by:
execute in class JmolConsole

completeCommand

protected java.lang.String completeCommand(java.lang.String thisCmd)
Overrides:
completeCommand in class JmolConsole