public abstract class GenericConsole extends java.lang.Object implements JmolAppConsoleInterface, JmolCallbackListener
Modifier and Type | Field and Description |
---|---|
protected JmolAbstractButton |
clearInButton |
protected JmolAbstractButton |
clearOutButton |
protected java.lang.String |
defaultMessage |
protected JmolAbstractButton |
editButton |
protected JmolAbstractButton |
historyButton |
private java.lang.String |
incompleteCmd |
protected GenericTextArea |
input |
protected JmolAbstractButton |
label1 |
protected java.util.Map<java.lang.String,java.lang.String> |
labels |
protected JmolAbstractButton |
loadButton |
protected java.util.Map<java.lang.String,java.lang.Object> |
menuMap |
int |
nTab |
protected GenericTextArea |
output |
protected JmolAbstractButton |
runButton |
protected JmolAbstractButton |
stateButton |
Viewer |
vwr |
Constructor and Description |
---|
GenericConsole() |
Modifier and Type | Method and Description |
---|---|
protected JmolAbstractButton |
addButton(JmolAbstractButton b,
java.lang.String label) |
protected void |
clearContent(java.lang.String text) |
java.lang.String |
completeCommand(java.lang.String thisCmd) |
protected void |
destroyConsole() |
protected void |
displayConsole() |
abstract void |
dispose() |
protected void |
doAction(java.lang.Object source) |
protected void |
execute(java.lang.String strCommand) |
protected java.lang.String |
getLabel(java.lang.String key) |
protected JmolAbstractButton |
getLabel1() |
static java.lang.String |
getLabelWithoutMnemonic(java.lang.String label) |
(package private) static char |
getMnemonic(java.lang.String label) |
abstract JmolScriptEditorInterface |
getScriptEditor() |
java.lang.String |
getText() |
protected abstract boolean |
isMenuItem(java.lang.Object source) |
protected abstract void |
layoutWindow(java.lang.String enabledButtons) |
static void |
map(java.lang.Object button,
java.lang.String key,
java.lang.String label,
java.util.Map<java.lang.String,java.lang.Object> menuMap) |
protected abstract java.lang.String |
nextFileName(java.lang.String stub,
int nTab) |
void |
notifyCallback(CBK type,
java.lang.Object[] data) |
boolean |
notifyEnabled(CBK type) |
private void |
outputMsg(java.lang.String message) |
protected int |
processKey(int kcode,
int kid,
boolean isControlDown) |
protected void |
recallCommand(boolean up) |
void |
sendConsoleEcho(java.lang.String strEcho) |
void |
sendConsoleMessage(java.lang.String strInfo) |
static void |
setAbstractButtonLabels(java.util.Map<java.lang.String,java.lang.Object> menuMap,
java.util.Map<java.lang.String,java.lang.String> labels) |
protected abstract JmolAbstractButton |
setButton(java.lang.String text) |
void |
setCallbackFunction(java.lang.String callbackType,
java.lang.String callbackFunction) |
protected void |
setLabels() |
protected abstract void |
setTitle() |
protected void |
setupLabels() |
protected void |
setViewer(Viewer vwr) |
abstract void |
setVisible(boolean visible) |
private static java.lang.String[] |
splitCommandLine(java.lang.String cmd)
separate a command line into three sections:
prefix....;cmd ........
|
protected void |
updateLabels() |
void |
zap() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
start
protected GenericTextArea input
protected GenericTextArea output
public Viewer vwr
protected java.util.Map<java.lang.String,java.lang.String> labels
protected java.util.Map<java.lang.String,java.lang.Object> menuMap
protected JmolAbstractButton editButton
protected JmolAbstractButton runButton
protected JmolAbstractButton historyButton
protected JmolAbstractButton stateButton
protected JmolAbstractButton clearOutButton
protected JmolAbstractButton clearInButton
protected JmolAbstractButton loadButton
protected java.lang.String defaultMessage
protected JmolAbstractButton label1
public int nTab
private java.lang.String incompleteCmd
protected void setViewer(Viewer vwr)
protected abstract boolean isMenuItem(java.lang.Object source)
protected abstract void layoutWindow(java.lang.String enabledButtons)
protected abstract void setTitle()
public abstract void setVisible(boolean visible)
setVisible
in interface JmolAppConsoleInterface
public abstract JmolScriptEditorInterface getScriptEditor()
getScriptEditor
in interface JmolAppConsoleInterface
public abstract void dispose()
dispose
in interface JmolAppConsoleInterface
protected abstract JmolAbstractButton setButton(java.lang.String text)
protected JmolAbstractButton addButton(JmolAbstractButton b, java.lang.String label)
protected JmolAbstractButton getLabel1()
protected void setupLabels()
protected void setLabels()
protected java.lang.String getLabel(java.lang.String key)
protected void displayConsole()
protected void updateLabels()
protected abstract java.lang.String nextFileName(java.lang.String stub, int nTab)
public java.lang.String completeCommand(java.lang.String thisCmd)
protected void doAction(java.lang.Object source)
protected void execute(java.lang.String strCommand)
protected void destroyConsole()
public static void setAbstractButtonLabels(java.util.Map<java.lang.String,java.lang.Object> menuMap, java.util.Map<java.lang.String,java.lang.String> labels)
public static java.lang.String getLabelWithoutMnemonic(java.lang.String label)
static char getMnemonic(java.lang.String label)
public static void map(java.lang.Object button, java.lang.String key, java.lang.String label, java.util.Map<java.lang.String,java.lang.Object> menuMap)
public boolean notifyEnabled(CBK type)
notifyEnabled
in interface JmolCallbackListener
public java.lang.String getText()
getText
in interface JmolAppConsoleInterface
public void sendConsoleEcho(java.lang.String strEcho)
sendConsoleEcho
in interface JmolAppConsoleInterface
private void outputMsg(java.lang.String message)
protected void clearContent(java.lang.String text)
public void sendConsoleMessage(java.lang.String strInfo)
sendConsoleMessage
in interface JmolAppConsoleInterface
public void notifyCallback(CBK type, java.lang.Object[] data)
notifyCallback
in interface JmolCallbackListener
public void setCallbackFunction(java.lang.String callbackType, java.lang.String callbackFunction)
setCallbackFunction
in interface JmolCallbackListener
public void zap()
zap
in interface JmolAppConsoleInterface
protected void recallCommand(boolean up)
protected int processKey(int kcode, int kid, boolean isControlDown)
kcode
- kid
- isControlDown
- private static java.lang.String[] splitCommandLine(java.lang.String cmd)
cmd
-