Package org.jmol.console
Class ScriptEditor
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
org.jmol.console.ScriptEditor
- All Implemented Interfaces:
ActionListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants,JmolDropEditor,JmolScriptEditorInterface
public final class ScriptEditor
extends JDialog
implements JmolScriptEditorInterface, ActionListener, WindowListener
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) classNested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SimpleAttributeSetprotected SimpleAttributeSetprotected SimpleAttributeSetprivate JPanelprivate JButtonprivate JButtonprivate JButtonprivate JButtonprotected ScriptEditor.EditorTextPaneprotected Stringprivate JButtonprivate intprivate JButtonprivate JmolConsole(package private) intprivate static String[]private JButtonprivate booleanprivate JButtonprotected ScriptContextprotected Stringprivate JButtonprivate JButtonprivate JButtonprivate JButtonprivate JButtonprivate intprivate static final intprivate static final intprivate static final intprivate JButtonprivate JButtonprotected Stringprivate JButtonprivate Viewerprivate StringFields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPEFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate voidvoidcheckScript(int i) voiddispose()private voiddoFont()private voiddoHalt()private voiddoOpen()private voiddoPause()protected voiddoResume()private voiddoRun()voiddoStep()getText()private voidgotoCommand(int pt, SimpleAttributeSet attr) private voidgotoParsedLine(int i) private voidgotoPosition(int i, int j) voidgotoTop()(package private) voidlayoutWindow(Container container) voidloadContent(String script) voidvoidvoidnotifyContext(ScriptContext context, Object[] data) private voidprivate voidnotifyFont(int fontSize) voidvoidprivate voidnotifyThisCommand(int indices, SimpleAttributeSet att) protected voidopen()voidprotected voidparseScript(String text, int i) private voidsaveZip(boolean isAs) private voidprivate JButtonprivate voidsetContext(ScriptContext context) private voidvoidsetFilename(String filename) private voidsetSaveEnabled(String zipName) private voidsetState()voidsetVisible(boolean b) voidprivate booleanvoidvoidvoidvoidvoidvoidvoidvoidMethods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBackMethods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFrontMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jmol.api.JmolScriptEditorInterface
isVisible
-
Field Details
-
editor
-
buttonPanel
-
openButton
-
closeButton
-
loadButton
-
topButton
-
fontButton
-
checkButton
-
runButton
-
pauseButton
-
saveButton
-
saveAsButton
-
haltButton
-
clearButton
-
stateButton
-
consoleButton
-
stepButton
-
resumeButton
-
vwr
-
state
private int state -
STATE_EDITING
private static final int STATE_EDITING- See Also:
-
STATE_RUNNING
private static final int STATE_RUNNING- See Also:
-
STATE_PAUSED
private static final int STATE_PAUSED- See Also:
-
jmolConsole
-
title
-
parsedData
-
parsedContext
-
attHighlight
-
attEcho
-
attError
-
filename
-
map
-
noPrefs
private boolean noPrefs -
fontSize
private int fontSize -
zipFileName
-
lastOpened
-
lastIndices
int lastIndices
-
-
Constructor Details
-
ScriptEditor
public ScriptEditor() -
ScriptEditor
ScriptEditor(Viewer vwr, JFrame frame, JmolConsole jmolConsole)
-
-
Method Details
-
setAttributes
private void setAttributes() -
layoutWindow
-
setButton
-
notifyScriptStart
public void notifyScriptStart() -
setState
private void setState() -
setEnables
private void setEnables() -
notifyScriptTermination
-
setVisible
public void setVisible(boolean b) - Specified by:
setVisiblein interfaceJmolScriptEditorInterface- Overrides:
setVisiblein classDialog
-
getText
-
output
-
setSaveEnabled
-
dispose
public void dispose()- Specified by:
disposein interfaceJmolScriptEditorInterface- Overrides:
disposein classWindow
-
notifyContext
- Specified by:
notifyContextin interfaceJmolScriptEditorInterface
-
setContext
-
gotoCommand
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
checkAction
-
doFont
private void doFont() -
doRun
private void doRun() -
doPause
private void doPause() -
doStep
public void doStep() -
doResume
protected void doResume() -
gotoPosition
private void gotoPosition(int i, int j) -
doHalt
private void doHalt() -
updateFont
private boolean updateFont() -
saveZip
private void saveZip(boolean isAs) -
updateFontSize
public void updateFontSize() -
doOpen
private void doOpen() -
open
protected void open() -
gotoTop
public void gotoTop() -
checkScript
public void checkScript(int i) -
parseScript
-
gotoParsedLine
private void gotoParsedLine(int i) -
setFilename
-
show
- Specified by:
showin interfaceJmolScriptEditorInterface
-
windowOpened
- Specified by:
windowOpenedin interfaceWindowListener
-
windowClosing
- Specified by:
windowClosingin interfaceWindowListener
-
windowClosed
- Specified by:
windowClosedin interfaceWindowListener
-
windowIconified
- Specified by:
windowIconifiedin interfaceWindowListener
-
windowDeiconified
- Specified by:
windowDeiconifiedin interfaceWindowListener
-
windowActivated
- Specified by:
windowActivatedin interfaceWindowListener
-
windowDeactivated
- Specified by:
windowDeactivatedin interfaceWindowListener
-
loadContent
- Specified by:
loadContentin interfaceJmolDropEditor
-
loadFile
- Specified by:
loadFilein interfaceJmolDropEditor
-
notify
- Specified by:
notifyin interfaceJmolScriptEditorInterface
-
notifyFont
private void notifyFont(int fontSize) -
notifyDone
private void notifyDone() -
notifyThisCommand
-