public class AppConsole extends JmolConsole implements JmolAppConsoleInterface, EnterListener
Modifier and Type | Class and Description |
---|---|
(package private) class |
AppConsole.ConsoleDocument |
(package private) class |
AppConsole.ConsoleTextPane |
(package private) class |
AppConsole.ExecuteCommandThread |
JmolConsole.FileChecker
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALL_BUTTONS |
private javax.swing.JPanel |
buttonPanel |
protected java.util.Map<java.lang.String,javax.swing.AbstractButton> |
buttons |
private javax.swing.JButton |
checkButton |
private javax.swing.JButton |
clearButton |
private javax.swing.JButton |
closeButton |
protected AppConsole.ConsoleTextPane |
console |
private boolean |
dontsave |
(package private) AppConsole.ExecuteCommandThread |
execThread |
private javax.swing.JButton |
haltButton |
private javax.swing.JButton |
helpButton |
(package private) boolean |
isError |
(package private) javax.swing.JDialog |
jcd |
private static int |
MAXUNDO |
private javax.swing.JButton |
redoButton |
protected javax.swing.JButton |
stepButton |
private javax.swing.JButton |
topButton |
private javax.swing.JButton |
undoButton |
private int |
undoPointer |
private boolean |
undoSaved |
private java.lang.String[] |
undoStack |
private javax.swing.JButton |
varButton |
defaultMessage, editButton, externalContainer, historyButton, label1, labels, menuMap, nTab, runButton, scriptEditor, stateButton, viewer, viewerFrame
Constructor and Description |
---|
AppConsole() |
AppConsole(JmolViewer viewer,
java.awt.Container externalContainer,
java.lang.String enabledButtons)
general entry point
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
protected void |
clearContent(java.lang.String text) |
protected java.lang.String |
completeCommand(java.lang.String thisCmd) |
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) |
JmolAppConsoleInterface |
getAppConsole(JmolViewer viewer)
don't delete! used by Viewer after it gets the class by name
|
java.lang.String |
getText() |
private void |
layoutWindow(java.lang.String enabledButtons) |
void |
sendConsoleEcho(java.lang.String strEcho) |
void |
sendConsoleMessage(java.lang.String strStatus) |
protected javax.swing.JButton |
setButton(java.lang.String label) |
private void |
setError(boolean TF) |
protected void |
setupLabels() |
private void |
undoClear() |
private void |
undoRedo(boolean isRedo) |
private void |
undoSave(boolean incrementPtr) |
private boolean |
undoSetEnabled() |
void |
zap() |
addWindowListener, dispose, getLabel, getPane, getScriptEditor, getWindow, notifyCallback, notifyEnabled, setCallbackFunction, setEnabled, setTitle, setVisible, updateLabels, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose, getScriptEditor, setVisible
public static final java.lang.String ALL_BUTTONS
javax.swing.JDialog jcd
protected AppConsole.ConsoleTextPane console
protected javax.swing.JButton stepButton
protected java.util.Map<java.lang.String,javax.swing.AbstractButton> buttons
private javax.swing.JButton varButton
private javax.swing.JButton haltButton
private javax.swing.JButton closeButton
private javax.swing.JButton clearButton
private javax.swing.JButton helpButton
private javax.swing.JButton undoButton
private javax.swing.JButton redoButton
private javax.swing.JButton checkButton
private javax.swing.JButton topButton
private javax.swing.JPanel buttonPanel
boolean isError
AppConsole.ExecuteCommandThread execThread
private static int MAXUNDO
private java.lang.String[] undoStack
private int undoPointer
private boolean undoSaved
private boolean dontsave
public AppConsole(JmolViewer viewer, java.awt.Container externalContainer, java.lang.String enabledButtons)
viewer
- externalContainer
- a JFrame or JPanel or JDialogenabledButtons
- public AppConsole()
public JmolAppConsoleInterface getAppConsole(JmolViewer viewer)
getAppConsole
in interface JmolAppConsoleInterface
viewer
- public void sendConsoleEcho(java.lang.String strEcho)
sendConsoleEcho
in interface JmolAppConsoleInterface
sendConsoleEcho
in class JmolConsole
public void sendConsoleMessage(java.lang.String strStatus)
sendConsoleMessage
in interface JmolAppConsoleInterface
sendConsoleMessage
in class JmolConsole
protected javax.swing.JButton setButton(java.lang.String label)
setButton
in class JmolConsole
protected void setupLabels()
setupLabels
in class JmolConsole
private void layoutWindow(java.lang.String enabledButtons)
private void enableButton(java.lang.String name)
private void setError(boolean TF)
public void enterPressed()
enterPressed
in interface EnterListener
protected void execute(java.lang.String strCommand)
execute
in class JmolConsole
void executeCommandAsThread(java.lang.String strCommand)
public void zap()
zap
in interface JmolAppConsoleInterface
private void undoClear()
private boolean undoSetEnabled()
private void undoRedo(boolean isRedo)
private void undoSave(boolean incrementPtr)
void executeCommand(java.lang.String strCommand)
protected void clearContent(java.lang.String text)
clearContent
in class JmolConsole
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class JmolConsole
protected java.lang.String completeCommand(java.lang.String thisCmd)
completeCommand
in class JmolConsole
public java.lang.String getText()
getText
in interface JmolAppConsoleInterface
getText
in class JmolConsole