astex
Class MoleculeViewer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by astex.MoleculeViewer
All Implemented Interfaces:
MoleculeRendererListener, java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class MoleculeViewer
extends java.awt.Canvas
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.KeyListener, java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.AdjustmentListener, MoleculeRendererListener, java.awt.event.WindowListener

A component that can draw a molecule.

See Also:
Serialized Form

Field Summary
 boolean announce
          Are we announcing the origin of AstexViewer.
 java.lang.String[] builtinColors
           
 java.util.Hashtable keyDefinitions
          Definition of key bindings.
 MoleculeRenderer moleculeRenderer
          The molecule renderer that this viewer will use.
 java.lang.String onClickLabel
           
 boolean ready
          Are we initialised?
 java.awt.Image splashImage
          Are we initialised?
 UserInterface ui
          The user interface that we will generated if necessary.
 
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
 
Constructor Summary
MoleculeViewer()
          Default constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Implementation of ActionListener.
 void addMap(Map map)
          Add a map to the renderer.
 void addMolecule(Molecule molecule)
          Set the molecule that the renderer will use.
 void addNotify()
           
 void addRepaintListener(java.awt.Component c)
           
 void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
          AdjustmentListener to listen to contour levels being created.
 boolean animating()
          Are we animating?
 void atomSelected(MoleculeRenderer renderer, Atom atom)
          Respond to an atom click event.
 void buildContourLevelDialog()
          Actually build the contour level.
 java.lang.String checkExtension(Molecule mol, java.lang.String f)
          Check the file extension on a save file name.
 java.awt.Menu createBMPMenu()
           
 java.awt.CheckboxMenuItem createCheckboxMenuItem(java.lang.String label, boolean state)
          Create a single checkbox menu item.
 java.awt.Menu createCloseMoleculeMenu()
          Create the menu that lets us close molecules.
 java.awt.Menu createColorMenu()
          Create the color menu.
 java.awt.Menu createDisplayMenu()
          Create the display menu.
 java.awt.Menu createFileMenu()
          Create the file menu.
 java.awt.Menu createLigandMenu()
          Create the menu that lets us choose ligand groups.
 java.awt.Menu createMeasureMenu()
          Create the menu that picks measurement options.
 java.awt.MenuBar createMenuBar()
          Create the menu bar that we will use.
 java.awt.MenuItem createMenuItem(java.lang.String label)
          Create a single menu item.
 java.awt.Menu createOptionsMenu()
          Create the option menu.
 void createPopup(java.awt.event.MouseEvent e)
          Create a popup menu.
 java.awt.Menu createSaveMoleculeMenu()
          Create the menu that lets us save molecules.
 java.awt.Menu createSelectMenu()
          Create the select menu.
 java.awt.Menu createViewMenu()
          Create the view menu.
 void dirtyRepaint()
          Mark the renderer dirty and ask for repaint().
 void dispose()
           
 void drawImage(java.awt.Component c, java.awt.Graphics g)
          Paint the image.
 void drawLoadingScreen(java.awt.Graphics g)
          Function that paints the image when we load.
 void ensureMenusCreated()
          Ensure that the close molecule menu is created.
 void execute(java.lang.String s)
          Execute a command in the moleculeRenderer.
 void executeScript(java.lang.String filename)
           
 void finalize()
           
 void genericAdded(MoleculeRenderer renderer, Generic generic)
          A generic was added.
 void genericRemoved(MoleculeRenderer renderer, Generic generic)
          A generic was removed.
 java.lang.String getColor(int x, int y)
          Instruct AstexViewer to display its color gadget so that a JavaScript interface can use it for picking colours.
 MoleculeRenderer getMoleculeRenderer()
          Get the molecule renderer that we contain.
 java.awt.Dimension getPreferredSize()
          Return the preferred size.
 java.lang.String getView()
          Return scripting description of the view.
 void handleAnimation(Arguments args)
          Get the animation thread.
 boolean handleMenuAction(java.awt.event.ActionEvent e, java.lang.String commandString)
          Handle more complex menu actions.
 void handleMouseOver(java.awt.event.MouseEvent e)
           
 void handleMouseOverCommand(java.awt.event.MouseEvent e)
           
 void handlePrint(java.lang.String output)
          Handle a print command in the scripting language.
 void hideContourLevelDialog()
          Hide the contour level dialog.
 void install(java.lang.Object o)
           
 boolean interactiveAnimation()
           
 boolean isApplication()
          Are we running in application.
 void itemStateChanged(java.awt.event.ItemEvent e)
          Implementation of ItemListener.
 void keyPressed(java.awt.event.KeyEvent e)
          Implementation of KeyListener.
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 java.lang.String loadFile(java.lang.String title)
          Convenience method for loading a file.
 void loadMap(java.lang.String filename)
          Load a map given the name of its file.
 void loadMolecule(java.lang.String filename)
          Load a molecule given the name of its file.
static void main(java.lang.String[] args)
          Main entry point.
 void mapAdded(MoleculeRenderer renderer, Map map)
          Respond to a map added event.
 void mapRemoved(MoleculeRenderer renderer, Map map)
          Respond to a map added event.
 void moleculeAdded(MoleculeRenderer renderer, Molecule molecule)
          Respond to a molecule added event.
 void moleculeRemoved(MoleculeRenderer renderer, Molecule molecule)
          Respond to a molecule removed event.
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
          Handle the mouse being dragged.
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
          Handle a mousePressed event.
 void mouseReleased(java.awt.event.MouseEvent e)
          Handle a mouseReleased event.
 void paint(java.awt.Graphics g)
          Override the paint method.
 void readKeyDefinitions()
           
 void removeAnimationThread(java.lang.Thread t)
          Try and remove a thread after it has finished running.
 void removeMap(Map map)
          Remove a map from the renderer.
 void removeRepaintListener(java.awt.Component c)
           
 void resetAwtImage()
          Force the awt image to get replaced.
 void saveAndExit()
          Save the whole state.
 java.lang.String saveFile(java.lang.String title, java.lang.String[] extensions)
          Get a file name to save to.
 void saveMolecule(Molecule molecule)
          Save this molecule.
 void saveMoleculeByName(java.lang.String name)
          Save this molecule.
 void saveMolecules()
          Save the small molecules.
 void saveScript(java.lang.String scriptFile)
           
 void setActiveLight(int al, Light l)
           
 void setApplication(boolean b)
          Set whether we are running in application.
 void setArrayCopy(boolean arraycopy)
          Should the renderer use arraycopy for clearing its buffers.
 void setBounds(int x, int y, int width, int height)
          Handle a resize.
 void setBounds(java.awt.Rectangle r)
          Handle a resize in a different way.
 void setCenter(Point3d center)
          Set the center point of the underlying renderer.
 void setPreferredSize(int w, int h)
          Set the preferred size.
 void setRadius(double radius)
          Set the radius of the underlying renderer.
 void setShowVersion(boolean b)
          Should we show the version.
 void setSymmetry(boolean symmetry)
          Set whether we are displaying symmetry.
 void setUsePopupMenu(boolean state)
          Set whether we should use the popup menu.
static void showAt(java.awt.Dialog d, int x, int y)
          Show the dialog at the position.
 void showContourLevelDialog()
          Popup a dialog which allow us to alter contour levels.
 void suspendAnimationThread(boolean run)
          Handle (de)activation of animation thread.
 void update(java.awt.Graphics g)
          Overridden update method.
 void updateCloseMoleculeMenu()
          Update the close molecule menu.
 void updateMenus()
          Cause all the menus to get updated.
 void updateSaveMoleculeMenu()
          Update the save molecule menu.
 void updateSelectMenu()
          Update the contents of the select menu.
 void windowActivated(java.awt.event.WindowEvent e)
           
 void windowClosed(java.awt.event.WindowEvent e)
           
 void windowClosing(java.awt.event.WindowEvent e)
           
 void windowDeactivated(java.awt.event.WindowEvent e)
           
 void windowDeiconified(java.awt.event.WindowEvent e)
           
 void windowIconified(java.awt.event.WindowEvent e)
           
 void windowOpened(java.awt.event.WindowEvent e)
           
 
Methods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

moleculeRenderer

public MoleculeRenderer moleculeRenderer
The molecule renderer that this viewer will use.


ready

public boolean ready
Are we initialised?


splashImage

public java.awt.Image splashImage
Are we initialised?


announce

public boolean announce
Are we announcing the origin of AstexViewer.


keyDefinitions

public java.util.Hashtable keyDefinitions
Definition of key bindings.


onClickLabel

public java.lang.String onClickLabel

builtinColors

public java.lang.String[] builtinColors

ui

public transient UserInterface ui
The user interface that we will generated if necessary.

Constructor Detail

MoleculeViewer

public MoleculeViewer()
Default constructor.

Method Detail

isApplication

public boolean isApplication()
Are we running in application.


setApplication

public void setApplication(boolean b)
Set whether we are running in application.


handleAnimation

public void handleAnimation(Arguments args)
Get the animation thread.


removeAnimationThread

public void removeAnimationThread(java.lang.Thread t)
Try and remove a thread after it has finished running.


animating

public boolean animating()
Are we animating?


interactiveAnimation

public boolean interactiveAnimation()

handlePrint

public void handlePrint(java.lang.String output)
Handle a print command in the scripting language.


suspendAnimationThread

public void suspendAnimationThread(boolean run)
Handle (de)activation of animation thread.


execute

public void execute(java.lang.String s)
Execute a command in the moleculeRenderer.


addNotify

public void addNotify()
Overrides:
addNotify in class java.awt.Canvas

readKeyDefinitions

public void readKeyDefinitions()

dispose

public void dispose()

getMoleculeRenderer

public MoleculeRenderer getMoleculeRenderer()
Get the molecule renderer that we contain.


setArrayCopy

public void setArrayCopy(boolean arraycopy)
Should the renderer use arraycopy for clearing its buffers.


addMolecule

public void addMolecule(Molecule molecule)
Set the molecule that the renderer will use.


loadMolecule

public void loadMolecule(java.lang.String filename)
Load a molecule given the name of its file.


executeScript

public void executeScript(java.lang.String filename)

loadMap

public void loadMap(java.lang.String filename)
Load a map given the name of its file.


setBounds

public void setBounds(java.awt.Rectangle r)
Handle a resize in a different way.

Overrides:
setBounds in class java.awt.Component

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Handle a resize.

Overrides:
setBounds in class java.awt.Component

setCenter

public void setCenter(Point3d center)
Set the center point of the underlying renderer.


setRadius

public void setRadius(double radius)
Set the radius of the underlying renderer.


setSymmetry

public void setSymmetry(boolean symmetry)
Set whether we are displaying symmetry.


addMap

public void addMap(Map map)
Add a map to the renderer.


removeMap

public void removeMap(Map map)
Remove a map from the renderer.


setPreferredSize

public void setPreferredSize(int w,
                             int h)
Set the preferred size.


getPreferredSize

public java.awt.Dimension getPreferredSize()
Return the preferred size.

Overrides:
getPreferredSize in class java.awt.Component

update

public void update(java.awt.Graphics g)
Overridden update method.

Overrides:
update in class java.awt.Canvas

paint

public void paint(java.awt.Graphics g)
Override the paint method.

Overrides:
paint in class java.awt.Canvas

drawLoadingScreen

public void drawLoadingScreen(java.awt.Graphics g)
Function that paints the image when we load.


resetAwtImage

public void resetAwtImage()
Force the awt image to get replaced.


drawImage

public void drawImage(java.awt.Component c,
                      java.awt.Graphics g)
Paint the image.


finalize

public void finalize()
Overrides:
finalize in class java.lang.Object

setActiveLight

public void setActiveLight(int al,
                           Light l)

main

public static void main(java.lang.String[] args)
Main entry point.


mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Handle a mousePressed event.

Specified by:
mousePressed in interface java.awt.event.MouseListener

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Specified by:
windowClosing in interface java.awt.event.WindowListener

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Specified by:
windowActivated in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Specified by:
windowIconified in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Specified by:
windowOpened in interface java.awt.event.WindowListener

setUsePopupMenu

public void setUsePopupMenu(boolean state)
Set whether we should use the popup menu.


createPopup

public void createPopup(java.awt.event.MouseEvent e)
Create a popup menu.


setShowVersion

public void setShowVersion(boolean b)
Should we show the version.


install

public void install(java.lang.Object o)

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Handle a mouseReleased event.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Handle the mouse being dragged.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

handleMouseOver

public void handleMouseOver(java.awt.event.MouseEvent e)

handleMouseOverCommand

public void handleMouseOverCommand(java.awt.event.MouseEvent e)

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Implementation of KeyListener.

Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

createMenuBar

public java.awt.MenuBar createMenuBar()
Create the menu bar that we will use.


createFileMenu

public java.awt.Menu createFileMenu()
Create the file menu.


createBMPMenu

public java.awt.Menu createBMPMenu()

createSelectMenu

public java.awt.Menu createSelectMenu()
Create the select menu.


createDisplayMenu

public java.awt.Menu createDisplayMenu()
Create the display menu.


createColorMenu

public java.awt.Menu createColorMenu()
Create the color menu.


createViewMenu

public java.awt.Menu createViewMenu()
Create the view menu.


createOptionsMenu

public java.awt.Menu createOptionsMenu()
Create the option menu.


createCloseMoleculeMenu

public java.awt.Menu createCloseMoleculeMenu()
Create the menu that lets us close molecules.


createSaveMoleculeMenu

public java.awt.Menu createSaveMoleculeMenu()
Create the menu that lets us save molecules.


createLigandMenu

public java.awt.Menu createLigandMenu()
Create the menu that lets us choose ligand groups.


createMeasureMenu

public java.awt.Menu createMeasureMenu()
Create the menu that picks measurement options.


createMenuItem

public java.awt.MenuItem createMenuItem(java.lang.String label)
Create a single menu item.


createCheckboxMenuItem

public java.awt.CheckboxMenuItem createCheckboxMenuItem(java.lang.String label,
                                                        boolean state)
Create a single checkbox menu item.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Implementation of ActionListener.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

buildContourLevelDialog

public void buildContourLevelDialog()
Actually build the contour level.


showContourLevelDialog

public void showContourLevelDialog()
Popup a dialog which allow us to alter contour levels.


hideContourLevelDialog

public void hideContourLevelDialog()
Hide the contour level dialog.


adjustmentValueChanged

public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
AdjustmentListener to listen to contour levels being created.

Specified by:
adjustmentValueChanged in interface java.awt.event.AdjustmentListener

handleMenuAction

public boolean handleMenuAction(java.awt.event.ActionEvent e,
                                java.lang.String commandString)
Handle more complex menu actions.


saveMoleculeByName

public void saveMoleculeByName(java.lang.String name)
Save this molecule.


checkExtension

public java.lang.String checkExtension(Molecule mol,
                                       java.lang.String f)
Check the file extension on a save file name.


itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Implementation of ItemListener.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener

dirtyRepaint

public void dirtyRepaint()
Mark the renderer dirty and ask for repaint().


addRepaintListener

public void addRepaintListener(java.awt.Component c)

removeRepaintListener

public void removeRepaintListener(java.awt.Component c)

loadFile

public java.lang.String loadFile(java.lang.String title)
Convenience method for loading a file.


saveFile

public java.lang.String saveFile(java.lang.String title,
                                 java.lang.String[] extensions)
Get a file name to save to.


moleculeAdded

public void moleculeAdded(MoleculeRenderer renderer,
                          Molecule molecule)
Respond to a molecule added event.

Specified by:
moleculeAdded in interface MoleculeRendererListener

moleculeRemoved

public void moleculeRemoved(MoleculeRenderer renderer,
                            Molecule molecule)
Respond to a molecule removed event.

Specified by:
moleculeRemoved in interface MoleculeRendererListener

mapAdded

public void mapAdded(MoleculeRenderer renderer,
                     Map map)
Respond to a map added event.

Specified by:
mapAdded in interface MoleculeRendererListener

mapRemoved

public void mapRemoved(MoleculeRenderer renderer,
                       Map map)
Respond to a map added event.

Specified by:
mapRemoved in interface MoleculeRendererListener

atomSelected

public void atomSelected(MoleculeRenderer renderer,
                         Atom atom)
Respond to an atom click event.

Specified by:
atomSelected in interface MoleculeRendererListener

genericAdded

public void genericAdded(MoleculeRenderer renderer,
                         Generic generic)
Description copied from interface: MoleculeRendererListener
A generic was added.

Specified by:
genericAdded in interface MoleculeRendererListener

genericRemoved

public void genericRemoved(MoleculeRenderer renderer,
                           Generic generic)
Description copied from interface: MoleculeRendererListener
A generic was removed.

Specified by:
genericRemoved in interface MoleculeRendererListener

ensureMenusCreated

public void ensureMenusCreated()
Ensure that the close molecule menu is created.


updateMenus

public void updateMenus()
Cause all the menus to get updated.


updateCloseMoleculeMenu

public void updateCloseMoleculeMenu()
Update the close molecule menu.


updateSaveMoleculeMenu

public void updateSaveMoleculeMenu()
Update the save molecule menu.


updateSelectMenu

public void updateSelectMenu()
Update the contents of the select menu.


saveMolecules

public void saveMolecules()
Save the small molecules.


getView

public java.lang.String getView()
Return scripting description of the view.


saveMolecule

public void saveMolecule(Molecule molecule)
Save this molecule.


saveScript

public void saveScript(java.lang.String scriptFile)

saveAndExit

public void saveAndExit()
Save the whole state.


getColor

public java.lang.String getColor(int x,
                                 int y)
Instruct AstexViewer to display its color gadget so that a JavaScript interface can use it for picking colours.


showAt

public static void showAt(java.awt.Dialog d,
                          int x,
                          int y)
Show the dialog at the position.