AppConsole
Date: 2019-10-22

org.openscience.jmol.app.jmolpanel.console

## Class AppConsole

- java.lang.Object
- - org.jmol.console.GenericConsole
  - - org.jmol.console.JmolConsole
    - - org.openscience.jmol.app.jmolpanel.console.AppConsole

- All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.util.EventListener, JmolAppConsoleInterface, JmolCallbackListener, JmolDropEditor, EnterListener

      public class AppConsole
      extends JmolConsole
      implements EnterListener, JmolDropEditor

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `(package private) class` | `AppConsole.ConsoleDocument`
    `(package private) class` | `AppConsole.ConsoleTextPane`
    `(package private) class` | `AppConsole.ExecuteCommandThread`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ALL_BUTTONS`
    `private javax.swing.JPanel` | `buttonPanel`
    `private JmolAbstractButton` | `checkButton`
    `private JmolAbstractButton` | `clearButton`
    `private JmolAbstractButton` | `closeButton`
    `protected AppConsole.ConsoleTextPane` | `console`
    `private boolean` | `dontsave`
    `(package private) AppConsole.ExecuteCommandThread` | `execThread`
    `private JmolAbstractButton` | `fontButton`
    `private int` | `fontSize`
    `private JmolAbstractButton` | `haltButton`
    `protected javax.swing.JScrollBar` | `hBar`
    `private JmolAbstractButton` | `helpButton`
    `(package private) boolean` | `isError`
    `javax.swing.JDialog` | `jcd`
    `private static int` | `MAXUNDO`
    `private JmolAbstractButton` | `redoButton`
    `private JmolStatusListener` | `statusListener`
    `private JmolAbstractButton` | `stepButton`
    `private JmolAbstractButton` | `topButton`
    `private JmolAbstractButton` | `undoButton`
    `private int` | `undoPointer`
    `private boolean` | `undoSaved`
    `private java.lang.String[]` | `undoStack`
    `private JmolAbstractButton` | `varButton`
    `protected javax.swing.JScrollBar` | `vBar`

    - ### Fields inherited from class org.jmol.console.JmolConsole

      `externalContainer, scriptEditor, vwrFrame`

    - ### Fields inherited from class org.jmol.console.GenericConsole

      `clearInButton, clearOutButton, defaultMessage, editButton, historyButton, input, label1, labels, loadButton, menuMap, nTab, output, runButton, stateButton, vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AppConsole()`
    `AppConsole(JmolViewer vwr, java.awt.Container externalContainer, java.lang.String enabledButtons)` general entry point

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actionPerformed(java.awt.event.ActionEvent e)`
    `protected void` | `clearContent(java.lang.String text)`
    `private void` | `enableButton(java.lang.String name)`
    `void` | `enterPressed()`
    `protected void` | `execute(java.lang.String strCommand)`
    `(package private) void` | `executeCommand(java.lang.String strCommand)`
    `(package private) void` | `executeCommandAsThread(java.lang.String strCommand)`
    `java.lang.String` | `getText()`
    `protected void` | `layoutWindow(java.lang.String enabledButtons)`
    `void` | `loadContent(java.lang.String script)`
    `void` | `loadFile(java.lang.String fileName)`
    `void` | `sendConsoleEcho(java.lang.String strEcho)`
    `void` | `sendConsoleMessage(java.lang.String strStatus)`
    `protected JmolAbstractButton` | `setButton(java.lang.String label)`
    `private static void` | `setEnabled(JmolAbstractButton button, boolean TF)`
    `private void` | `setError(boolean TF)`
    `void` | `setStatusListener(JmolStatusListener myStatusListener)`
    `private void` | `setup(Viewer vwr, java.awt.Container externalContainer, java.lang.String enabledButtons)`
    `protected void` | `setupLabels0(java.util.Map<java.lang.String,java.lang.String> labels)`
    `void` | `start(Viewer vwr)`
    `private void` | `undoClear()`
    `private void` | `undoRedo(boolean isRedo)`
    `private void` | `undoSave(boolean incrementPtr)`
    `private boolean` | `undoSetEnabled()`
    `void` | `updateFontSize()`

    - ### Methods inherited from class org.jmol.console.JmolConsole

      `addWindowListener, dispose, getPane, getScriptEditor, isMenuItem, newJMenu, newJMenuItem, nextFileName, setTitle, setVisible, updateLabels, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened`

    - ### Methods inherited from class org.jmol.console.GenericConsole

      `addButton, completeCommand, destroyConsole, displayConsole, doAction, getLabel, getLabel1, getLabelWithoutMnemonic, map, notifyCallback, notifyEnabled, processKey, recallCommand, setAbstractButtonLabels, setCallbackFunction, setLabels, setupLabels, setViewer, zap`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ALL_BUTTONS

          public static final java.lang.String ALL_BUTTONS

      See Also:
        Constant Field Values

    - #### fontSize

          private int fontSize

    - #### jcd

          public javax.swing.JDialog jcd

    - #### console

          protected AppConsole.ConsoleTextPane console

    - #### varButton

          private JmolAbstractButton varButton

    - #### haltButton

          private JmolAbstractButton haltButton

    - #### closeButton

          private JmolAbstractButton closeButton

    - #### clearButton

          private JmolAbstractButton clearButton

    - #### stepButton

          private JmolAbstractButton stepButton

    - #### helpButton

          private JmolAbstractButton helpButton

    - #### undoButton

          private JmolAbstractButton undoButton

    - #### redoButton

          private JmolAbstractButton redoButton

    - #### checkButton

          private JmolAbstractButton checkButton

    - #### topButton

          private JmolAbstractButton topButton

    - #### fontButton

          private JmolAbstractButton fontButton

    - #### buttonPanel

          private javax.swing.JPanel buttonPanel

    - #### vBar

          protected javax.swing.JScrollBar vBar

    - #### hBar

          protected javax.swing.JScrollBar hBar

    - #### isError

          boolean isError

    - #### execThread

          AppConsole.ExecuteCommandThread execThread

    - #### MAXUNDO

          private static int MAXUNDO

    - #### undoStack

          private java.lang.String[] undoStack

    - #### undoPointer

          private int undoPointer

    - #### undoSaved

          private boolean undoSaved

    - #### dontsave

          private boolean dontsave

    - #### statusListener

          private JmolStatusListener statusListener

  - ### Constructor Detail

    - #### AppConsole

          public AppConsole()

    - #### AppConsole

          public AppConsole(JmolViewer vwr,
                            java.awt.Container externalContainer,
                            java.lang.String enabledButtons)

      general entry point
      Parameters:
        `vwr` -
        `externalContainer` - a JFrame or JPanel or JDialog
        `enabledButtons` -

  - ### Method Detail

    - #### loadContent

          public void loadContent(java.lang.String script)

      Specified by:
        `loadContent` in interface `JmolDropEditor`

    - #### loadFile

          public void loadFile(java.lang.String fileName)

      Specified by:
        `loadFile` in interface `JmolDropEditor`

    - #### start

          public void start(Viewer vwr)

      Specified by:
        `start` in interface `JmolAppConsoleInterface`

    - #### setup

          private void setup(Viewer vwr,
                             java.awt.Container externalContainer,
                             java.lang.String enabledButtons)

    - #### updateFontSize

          public void updateFontSize()

      Overrides:
        `updateFontSize` in class `JmolConsole`

    - #### sendConsoleEcho

          public void sendConsoleEcho(java.lang.String strEcho)

      Specified by:
        `sendConsoleEcho` in interface `JmolAppConsoleInterface`
      Overrides:
        `sendConsoleEcho` in class `GenericConsole`

    - #### sendConsoleMessage

          public void sendConsoleMessage(java.lang.String strStatus)

      Specified by:
        `sendConsoleMessage` in interface `JmolAppConsoleInterface`
      Overrides:
        `sendConsoleMessage` in class `GenericConsole`

    - #### setButton

          protected JmolAbstractButton setButton(java.lang.String label)

      Overrides:
        `setButton` in class `JmolConsole`

    - #### setupLabels0

          protected void setupLabels0(java.util.Map<java.lang.String,java.lang.String> labels)

      Overrides:
        `setupLabels0` in class `GenericConsole`

    - #### layoutWindow

          protected void layoutWindow(java.lang.String enabledButtons)

      Specified by:
        `layoutWindow` in class `GenericConsole`

    - #### setEnabled

          private static void setEnabled(JmolAbstractButton button,
                                         boolean TF)

    - #### enableButton

          private void enableButton(java.lang.String name)

    - #### setError

          private void setError(boolean TF)

    - #### enterPressed

          public void enterPressed()

      Specified by:
        `enterPressed` in interface `EnterListener`

    - #### execute

          protected void execute(java.lang.String strCommand)

      Overrides:
        `execute` in class `GenericConsole`

    - #### executeCommandAsThread

          void executeCommandAsThread(java.lang.String strCommand)

    - #### undoClear

          private void undoClear()

    - #### undoSetEnabled

          private boolean undoSetEnabled()

    - #### undoRedo

          private void undoRedo(boolean isRedo)

    - #### undoSave

          private void undoSave(boolean incrementPtr)

    - #### executeCommand

          void executeCommand(java.lang.String strCommand)

    - #### clearContent

          protected void clearContent(java.lang.String text)

      Overrides:
        `clearContent` in class `GenericConsole`

    - #### actionPerformed

          public void actionPerformed(java.awt.event.ActionEvent e)

      Specified by:
        `actionPerformed` in interface `java.awt.event.ActionListener`
      Overrides:
        `actionPerformed` in class `JmolConsole`

    - #### getText

          public java.lang.String getText()

      Specified by:
        `getText` in interface `JmolAppConsoleInterface`
      Overrides:
        `getText` in class `GenericConsole`

    - #### setStatusListener

          public void setStatusListener(JmolStatusListener myStatusListener)