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) class
Nested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialog
Nested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.Type
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SimpleAttributeSet
protected SimpleAttributeSet
protected SimpleAttributeSet
private JPanel
private JButton
private JButton
private JButton
private JButton
protected ScriptEditor.EditorTextPane
protected String
private JButton
private int
private JButton
private JmolConsole
(package private) int
private static String[]
private JButton
private boolean
private JButton
protected ScriptContext
protected String
private JButton
private JButton
private JButton
private JButton
private JButton
private int
private static final int
private static final int
private static final int
private JButton
private JButton
protected String
private JButton
private Viewer
private String
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields 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 TypeMethodDescriptionvoid
private void
void
checkScript
(int i) void
dispose()
private void
doFont()
private void
doHalt()
private void
doOpen()
private void
doPause()
protected void
doResume()
private void
doRun()
void
doStep()
getText()
private void
gotoCommand
(int pt, SimpleAttributeSet attr) private void
gotoParsedLine
(int i) private void
gotoPosition
(int i, int j) void
gotoTop()
(package private) void
layoutWindow
(Container container) void
loadContent
(String script) void
void
void
notifyContext
(ScriptContext context, Object[] data) private void
private void
notifyFont
(int fontSize) void
void
private void
notifyThisCommand
(int indices, SimpleAttributeSet att) protected void
open()
void
protected void
parseScript
(String text, int i) private void
saveZip
(boolean isAs) private void
private JButton
private void
setContext
(ScriptContext context) private void
void
setFilename
(String filename) private void
setSaveEnabled
(String zipName) private void
setState()
void
setVisible
(boolean b) void
private boolean
void
void
void
void
void
void
void
void
Methods 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, update
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
Methods 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, toFront
Methods 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, validateTree
Methods 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, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
setVisible
in interfaceJmolScriptEditorInterface
- Overrides:
setVisible
in classDialog
-
getText
-
output
-
setSaveEnabled
-
dispose
public void dispose()- Specified by:
dispose
in interfaceJmolScriptEditorInterface
- Overrides:
dispose
in classWindow
-
notifyContext
- Specified by:
notifyContext
in interfaceJmolScriptEditorInterface
-
setContext
-
gotoCommand
-
actionPerformed
- Specified by:
actionPerformed
in 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:
show
in interfaceJmolScriptEditorInterface
-
windowOpened
- Specified by:
windowOpened
in interfaceWindowListener
-
windowClosing
- Specified by:
windowClosing
in interfaceWindowListener
-
windowClosed
- Specified by:
windowClosed
in interfaceWindowListener
-
windowIconified
- Specified by:
windowIconified
in interfaceWindowListener
-
windowDeiconified
- Specified by:
windowDeiconified
in interfaceWindowListener
-
windowActivated
- Specified by:
windowActivated
in interfaceWindowListener
-
windowDeactivated
- Specified by:
windowDeactivated
in interfaceWindowListener
-
loadContent
- Specified by:
loadContent
in interfaceJmolDropEditor
-
loadFile
- Specified by:
loadFile
in interfaceJmolDropEditor
-
notify
- Specified by:
notify
in interfaceJmolScriptEditorInterface
-
notifyFont
private void notifyFont(int fontSize) -
notifyDone
private void notifyDone() -
notifyThisCommand
-