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 JmolAbstractButton
protected JmolAbstractButton
protected String
protected JmolAbstractButton
protected JmolAbstractButton
private String
protected GenericConsoleTextArea
protected JmolAbstractButton
protected JmolAbstractButton
int
protected GenericConsoleTextArea
protected JmolAbstractButton
protected JmolAbstractButton
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JmolAbstractButton
addButton
(JmolAbstractButton b, String label) protected void
clearContent
(String text) completeCommand
(String thisCmd) protected void
protected void
abstract void
dispose()
protected void
protected void
static String
protected JmolAbstractButton
static String
getLabelWithoutMnemonic
(String label) (package private) static char
getMnemonic
(String label) abstract JmolScriptEditorInterface
getText()
protected abstract boolean
isMenuItem
(Object source) protected abstract void
layoutWindow
(String enabledButtons) static void
protected abstract String
nextFileName
(String stub, int nTab) void
notifyCallback
(CBK type, Object[] data) boolean
notifyEnabled
(CBK type) private void
protected int
processKey
(int kcode, int kid, boolean isControlDown) protected void
recallCommand
(boolean up, boolean pageUp) void
sendConsoleEcho
(String strEcho) void
sendConsoleMessage
(String strInfo) static void
protected abstract JmolAbstractButton
void
setCallbackFunction
(String callbackType, String callbackFunction) protected void
protected abstract void
setTitle()
protected void
setupLabels
(Map<String, String> labels) protected void
setupLabels0
(Map<String, String> labels) protected void
abstract void
setVisible
(boolean visible) private static String[]
splitCommandLine
(String cmd) separate a command line into three sections: prefix....;cmd ........protected String
protected void
void
zap()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
setVisible
in interfaceJmolAppConsoleInterface
-
getScriptEditor
- Specified by:
getScriptEditor
in interfaceJmolAppConsoleInterface
-
dispose
public abstract void dispose()- Specified by:
dispose
in 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:
notifyEnabled
in interfaceJmolCallbackListener
-
notifyCallback
- Specified by:
notifyCallback
in interfaceJmolCallbackListener
-
getText
- Specified by:
getText
in interfaceJmolAppConsoleInterface
-
sendConsoleEcho
- Specified by:
sendConsoleEcho
in interfaceJmolAppConsoleInterface
-
outputMsg
-
clearContent
-
sendConsoleMessage
- Specified by:
sendConsoleMessage
in interfaceJmolAppConsoleInterface
-
setCallbackFunction
- Specified by:
setCallbackFunction
in interfaceJmolCallbackListener
-
zap
public void zap()- Specified by:
zap
in 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}
-