Package org.jmol.console
Class GenericConsole
java.lang.Object
org.jmol.console.GenericConsole
- All Implemented Interfaces:
JmolAppConsoleInterface,JmolCallbackListener
- Direct Known Subclasses:
AppletConsole,JmolConsole
public abstract class GenericConsole
extends Object
implements JmolAppConsoleInterface, JmolCallbackListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JmolAbstractButtonprotected JmolAbstractButtonprotected Stringprotected JmolAbstractButtonprotected JmolAbstractButtonprivate Stringprotected GenericConsoleTextAreaprotected JmolAbstractButtonprotected JmolAbstractButtonintprotected GenericConsoleTextAreaprotected JmolAbstractButtonprotected JmolAbstractButton -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JmolAbstractButtonaddButton(JmolAbstractButton b, String label) protected voidclearContent(String text) completeCommand(String thisCmd) protected voidprotected voidabstract voiddispose()protected voidprotected voidstatic Stringprotected JmolAbstractButtonstatic StringgetLabelWithoutMnemonic(String label) (package private) static chargetMnemonic(String label) abstract JmolScriptEditorInterfacegetText()protected abstract booleanisMenuItem(Object source) protected abstract voidlayoutWindow(String enabledButtons) static voidprotected abstract StringnextFileName(String stub, int nTab) voidnotifyCallback(CBK type, Object[] data) booleannotifyEnabled(CBK type) private voidprotected intprocessKey(int kcode, int kid, boolean isControlDown) protected voidrecallCommand(boolean up, boolean pageUp) voidsendConsoleEcho(String strEcho) voidsendConsoleMessage(String strInfo) static voidprotected abstract JmolAbstractButtonvoidsetCallbackFunction(String callbackType, String callbackFunction) protected voidprotected abstract voidsetTitle()protected voidsetupLabels(Map<String, String> labels) protected voidsetupLabels0(Map<String, String> labels) protected voidabstract voidsetVisible(boolean visible) private static String[]splitCommandLine(String cmd) separate a command line into three sections: prefix....;cmd ........protected Stringprotected voidvoidzap()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jmol.api.JmolAppConsoleInterface
newJMenu, newJMenuItem, start
-
Field Details
-
input
-
output
-
vwr
-
labels
-
editButton
-
runButton
-
historyButton
-
stateButton
-
clearOutButton
-
clearInButton
-
loadButton
-
defaultMessage
-
label1
-
nTab
public int nTab -
incompleteCmd
-
-
Constructor Details
-
GenericConsole
public GenericConsole()
-
-
Method Details
-
setViewer
-
isMenuItem
-
layoutWindow
-
setTitle
protected abstract void setTitle() -
setVisible
public abstract void setVisible(boolean visible) - Specified by:
setVisiblein interfaceJmolAppConsoleInterface
-
getScriptEditor
- Specified by:
getScriptEditorin interfaceJmolAppConsoleInterface
-
dispose
public abstract void dispose()- Specified by:
disposein interfaceJmolAppConsoleInterface
-
setButton
-
addButton
-
getLabel1
-
setupLabels
-
setupLabels0
-
setLabels
protected void setLabels() -
getLabel
-
displayConsole
protected void displayConsole() -
updateLabels
protected void updateLabels() -
nextFileName
-
completeCommand
-
doAction
-
execute
-
destroyConsole
protected void destroyConsole() -
setAbstractButtonLabels
-
getLabelWithoutMnemonic
-
getMnemonic
-
map
-
notifyEnabled
- Specified by:
notifyEnabledin interfaceJmolCallbackListener
-
notifyCallback
- Specified by:
notifyCallbackin interfaceJmolCallbackListener
-
getText
- Specified by:
getTextin interfaceJmolAppConsoleInterface
-
sendConsoleEcho
- Specified by:
sendConsoleEchoin interfaceJmolAppConsoleInterface
-
outputMsg
-
clearContent
-
sendConsoleMessage
- Specified by:
sendConsoleMessagein interfaceJmolAppConsoleInterface
-
setCallbackFunction
- Specified by:
setCallbackFunctionin interfaceJmolCallbackListener
-
zap
public void zap()- Specified by:
zapin interfaceJmolAppConsoleInterface
-
recallCommand
protected void recallCommand(boolean up, boolean pageUp) - Parameters:
up-pageUp-
-
trimGUI
-
processKey
protected int processKey(int kcode, int kid, boolean isControlDown) - Parameters:
kcode-kid-isControlDown-- Returns:
- 1 = consume; 2 = super.process; 3 = both
-
splitCommandLine
separate a command line into three sections: prefix....;cmd ........ token where token can be a just-finished single or double quote or a string of characters- Parameters:
cmd-- Returns:
- String[] {prefix, cmd..... token}
-