# Class AppConsole

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

All Implemented Interfaces:
  `ActionListener, WindowListener, EventListener, JmolAppConsoleInterface, JmolCallbackListener, JmolDropEditor`

public class AppConsole extends JmolConsole implements JmolDropEditor

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`ALL_BUTTONS`
`protected org.openscience.jmol.app.jmolpanel.console.AppConsole.ConsoleTextPane`
`console`
`protected org.openscience.jmol.app.jmolpanel.console.AppConsole.ConsoleDocument`
`consoleDoc`
`protected JScrollBar`
`hBar`
`JDialog`
`jcd`
`protected JScrollBar`
`vBar`

### Fields inherited from class JmolConsole

`externalContainer, scriptEditor, vwrFrame`

### Fields inherited from class GenericConsole

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

## Constructor Summary

Constructors
Constructor
Description
`AppConsole()`
`AppConsole(JmolViewer vwr, Container externalContainer, String enabledButtons)`
general entry point

## Method Summary

Modifier and Type
Method
Description
`void`
`actionPerformed(ActionEvent e)`
`int`
`checkUndoEnabled()`
`protected void`
`clearContent(String text)`
`void`
`enterPressed()`
`protected void`
`execute(String strCommand)`
`String`
`getText()`
`protected void`
`layoutWindow(String enabledButtons)`
`void`
`loadContent(String script)`
Deprecated.
`void`
`loadFile(String fileName)`
`protected void`
`recallCommand(boolean up, boolean pageup)`
Recall command history.
`void`
`regainFocus()`
`void`
`sendConsoleEcho(String strEcho)`
`void`
`sendConsoleMessage(String strStatus)`
`protected JmolAbstractButton`
`setButton(String label)`
`void`
`setStatusListener(JmolStatusListener myStatusListener)`
`protected void`
`setupLabels0(Map<String,String> labels)`
`void`
`start(Viewer vwr)`
`void`
`updateFontSize()`

### Methods inherited from class JmolConsole

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

### Methods inherited from class GenericConsole

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

### Methods inherited from class Object

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

## Field Details

### ALL_BUTTONS

public static final String ALL_BUTTONS

See Also:
  - Constant Field Values

### jcd

public JDialog jcd

### console

protected org.openscience.jmol.app.jmolpanel.console.AppConsole.ConsoleTextPane console

### consoleDoc

protected org.openscience.jmol.app.jmolpanel.console.AppConsole.ConsoleDocument consoleDoc

### vBar

protected JScrollBar vBar

### hBar

protected JScrollBar hBar

## Constructor Details

### AppConsole

public AppConsole()

### AppConsole

public AppConsole(JmolViewer vwr, Container externalContainer, String enabledButtons)
general entry point

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

## Method Details

### loadContent

public void loadContent(String script)
Description copied from interface: `JmolDropEditor`
Deprecated. Designed to be used for dropping a script into the AppConsole or ScriptEditor in order to open it in the ScriptEditor, but that was never implemented.

Specified by:
  `loadContent` in interface `JmolDropEditor`
Parameters:
  `script` -

### loadFile

public void loadFile(String fileName)

Specified by:
  `loadFile` in interface `JmolDropEditor`

### start

public void start(Viewer vwr)

Specified by:
  `start` in interface `JmolAppConsoleInterface`

### updateFontSize

public void updateFontSize()

Overrides:
  `updateFontSize` in class `JmolConsole`

### sendConsoleEcho

public void sendConsoleEcho(String strEcho)

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

### sendConsoleMessage

public void sendConsoleMessage(String strStatus)

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

### setButton

protected JmolAbstractButton setButton(String label)

Overrides:
  `setButton` in class `JmolConsole`

### setupLabels0

protected void setupLabels0(Map<String,String> labels)

Overrides:
  `setupLabels0` in class `GenericConsole`

### layoutWindow

protected void layoutWindow(String enabledButtons)

Specified by:
  `layoutWindow` in class `GenericConsole`

### enterPressed

public void enterPressed()

### execute

protected void execute(String strCommand)

Overrides:
  `execute` in class `GenericConsole`

### checkUndoEnabled

public int checkUndoEnabled()

### clearContent

protected void clearContent(String text)

Overrides:
  `clearContent` in class `GenericConsole`

### actionPerformed

public void actionPerformed(ActionEvent e)

Specified by:
  `actionPerformed` in interface `ActionListener`
Overrides:
  `actionPerformed` in class `JmolConsole`

### recallCommand

protected void recallCommand(boolean up, boolean pageup)
Recall command history.

Overrides:
  `recallCommand` in class `GenericConsole`
Parameters:
  `up` - - history up or down
  `pageup` - TODO

### getText

public String getText()

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

### setStatusListener

public void setStatusListener(JmolStatusListener myStatusListener)

### regainFocus

public void regainFocus()

Specified by:
  `regainFocus` in interface `JmolAppConsoleInterface`