org.jmol.applet
Class AppletConsole

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by org.jmol.console.JmolConsole
                          extended by org.jmol.applet.AppletConsole
All Implemented Interfaces:
ActionListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants, JmolAppConsoleInterface

public class AppletConsole
extends JmolConsole
implements JmolAppConsoleInterface

See Also:
Serialized Form

Nested Class Summary
(package private)  class AppletConsole.ControlEnterTextArea
           
private static interface AppletConsole.GetKey
           
private  class AppletConsole.KeyJMenu
           
private  class AppletConsole.KeyJMenuItem
           
 
Nested classes/interfaces inherited from class org.jmol.console.JmolConsole
JmolConsole.FileChecker
 
Nested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
private  SimpleAttributeSet attributesCommand
           
private  JButton clearInButton
           
private  JButton clearOutButton
           
(package private)  JTextArea input
           
private  JFrame jf
           
protected  Hashtable labels
           
private  JButton loadButton
           
protected  Hashtable map
           
private  JMenuBar menubar
           
private  JTextPane output
           
private  Document outputDocument
           
 
Fields inherited from class org.jmol.console.JmolConsole
display, editButton, historyButton, nTab, runButton, scriptEditor, stateButton, viewer
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
  AppletConsole()
           
private AppletConsole(Viewer viewer, Component display)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
private  void addHelpItems(JMenu m0, String key, String attr)
           
protected  void addHelpMenuBar(JMenuBar menuBar)
           
protected  void clearContent(String text)
           
protected  String completeCommand(String thisCmd)
           
protected  JMenuBar createMenubar()
           
protected  JMenuItem createMenuItem(String cmd)
           
private  void destroyConsole()
           
 void dispose()
           
protected  void execute(String strCommand)
           
 JmolAppConsoleInterface getAppConsole(Viewer viewer, Component display)
           
private  String getLabel(String key)
           
private static String getLabelWithoutMnemonic(String label)
           
private static char getMnemonic(String label)
           
 Object getMyMenuBar()
           
 String getText()
           
private  JMenu newJMenu(String key)
           
private  JMenuItem newJMenuItem(String key)
           
private  void output(String message)
           
private  void output(String message, AttributeSet att)
           
 void sendConsoleEcho(String strEcho)
           
 void sendConsoleMessage(String strInfo)
           
private  void set(JmolViewer viewer)
           
private  void setupInput()
           
private  Hashtable setupLabels()
           
private  void setupOutput()
           
 void setVisible(boolean visible)
           
 void windowClosed(WindowEvent we)
           
 void windowClosing(WindowEvent we)
           
 void zap()
           
 
Methods inherited from class org.jmol.console.JmolConsole
getScriptEditor, getTitleText, windowActivated, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, show, toBack
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jmol.api.JmolAppConsoleInterface
getScriptEditor
 

Field Detail

input

final JTextArea input

output

private final JTextPane output

outputDocument

private final Document outputDocument

jf

private JFrame jf

attributesCommand

private final SimpleAttributeSet attributesCommand

menubar

private JMenuBar menubar

clearOutButton

private JButton clearOutButton

clearInButton

private JButton clearInButton

loadButton

private JButton loadButton

map

protected Hashtable map

labels

protected Hashtable labels
Constructor Detail

AppletConsole

public AppletConsole()

AppletConsole

private AppletConsole(Viewer viewer,
                      Component display)
Method Detail

getMyMenuBar

public Object getMyMenuBar()
Specified by:
getMyMenuBar in interface JmolAppConsoleInterface

dispose

public void dispose()
Specified by:
dispose in interface JmolAppConsoleInterface
Overrides:
dispose in class Window

getAppConsole

public JmolAppConsoleInterface getAppConsole(Viewer viewer,
                                             Component display)
Specified by:
getAppConsole in interface JmolAppConsoleInterface

sendConsoleEcho

public void sendConsoleEcho(String strEcho)
Specified by:
sendConsoleEcho in interface JmolAppConsoleInterface

sendConsoleMessage

public void sendConsoleMessage(String strInfo)
Specified by:
sendConsoleMessage in interface JmolAppConsoleInterface

zap

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

set

private void set(JmolViewer viewer)

createMenubar

protected JMenuBar createMenubar()

addHelpMenuBar

protected void addHelpMenuBar(JMenuBar menuBar)

addHelpItems

private void addHelpItems(JMenu m0,
                          String key,
                          String attr)

createMenuItem

protected JMenuItem createMenuItem(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 Dialog

output

private void output(String message)

output

private void output(String message,
                    AttributeSet att)

getText

public String getText()
Specified by:
getText in interface JmolAppConsoleInterface

clearContent

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

actionPerformed

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

execute

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

completeCommand

protected String completeCommand(String thisCmd)
Overrides:
completeCommand in class JmolConsole

windowClosed

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

destroyConsole

private void destroyConsole()

windowClosing

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

setupLabels

private Hashtable setupLabels()

getLabel

private String getLabel(String key)

newJMenu

private JMenu newJMenu(String key)

newJMenuItem

private JMenuItem newJMenuItem(String key)

getLabelWithoutMnemonic

private static String getLabelWithoutMnemonic(String label)

getMnemonic

private static char getMnemonic(String label)