# Class JmolJME

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
jme.JME
org.openscience.jmol.app.jmolpanel.JmolJME

All Implemented Interfaces:
  `KeyListener, MouseListener, MouseMotionListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, JmolDropEditor`

public class JmolJME extends JME implements WindowListener, JmolDropEditor
ONLY for legacy Jmol, not for JmolD (which uses jme.jmeJmol

See Also:
  - Serialized Form

## Nested Class Summary

### Nested classes/interfaces inherited from class JPanel

`JPanel.AccessibleJPanel`

### Nested classes/interfaces inherited from class JComponent

`JComponent.AccessibleJComponent`

### Nested classes/interfaces inherited from class Container

`Container.AccessibleAWTContainer`

### Nested classes/interfaces inherited from class Component

`Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy`

## Field Summary

### Fields inherited from class JME

`afterClear, allHs, apointx, apointy, application, autoez, autonumber, bpointx, bpointy, bwMode, canonize, depict, depictBorder, doMenu, doTags, dyMode, embedded, infoText, jmeh, keepHydrogens, markUsed, mol, mols, mouseShift, movePossible, multipart, myFrame, newMolecule, nmols, nocenter, number, polarnitro, query, rButton, reaction, relativeStereo, revertStereo, runsmi, showAtomNumbers, showHydrogens, star, stereo, webme, writemi, writemol, writesmi, xButton`

### Fields inherited from class JComponent

`listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW`

### Fields inherited from class Component

`accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

### Fields inherited from interface ImageObserver

`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

## Constructor Summary

Constructors
Constructor
Description
`JmolJME()`

## Method Summary

Modifier and Type
Method
Description
`void`
`dispose()`
`void`
`from3D()`
`BufferedImage`
`getImage(int marginX, int marginY)`
`String`
`inchi()`
`void`
`loadContent(String script)`
Deprecated.
`void`
`loadFile(String fname)`
When dropped, if the data are 2D, then read directly into JME.
`static void`
`main(String[] args)`
`void`
`setFrameVisible(boolean b)`
`protected boolean`
`setMol(boolean checkMultipart)`
`void`
`setViewer(JFrame frame, Viewer vwr, Container parent)`
`String`
`smiles()`
`void`
`to3D(boolean isAppend)`
`protected void`
`toCDXML()`
`protected void`
`toMOL()`
`void`
`toPNG(String filename)`
`void`
`windowActivated(WindowEvent e)`
`void`
`windowClosed(WindowEvent e)`
`void`
`windowClosing(WindowEvent e)`
`void`
`windowDeactivated(WindowEvent e)`
`void`
`windowDeiconified(WindowEvent e)`
`void`
`windowIconified(WindowEvent e)`
`void`
`windowOpened(WindowEvent e)`

### Methods inherited from class JME

`activateQuery, clear, doAction, doMouseAtomAction, doMouseBondAction, doNewMoleculeAction, getColor, getPreviousMolecule, hasPrevious, initialize, jmeFile, keyDown, keyPressed, keyReleased, keyTyped, molFile, mouseClicked, mouseDown, mouseDrag, mouseDragged, mouseEntered, mouseExited, mouseMove, mouseMoved, mousePressed, mouseReleased, mouseUp, nonisomericSmiles, options, paint, paintMolecularArea, ping, readMolecule, readMolFile, reset, setFrame, setSubstituent, setTemplate, setText, showAtomNumbers, start, stop, update, updateMark`

### Methods inherited from class JPanel

`getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI`

### Methods inherited from class JComponent

`addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction`

### Methods inherited from class Container

`add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree`

### Methods inherited from class Component

`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### JmolJME

public JmolJME()

## Method Details

### setViewer

public void setViewer(JFrame frame, Viewer vwr, Container parent)

### toPNG

public void toPNG(String filename)

### getImage

public BufferedImage getImage(int marginX, int marginY)

### windowOpened

public void windowOpened(WindowEvent e)

Specified by:
  `windowOpened` in interface `WindowListener`

### windowClosing

public void windowClosing(WindowEvent e)

Specified by:
  `windowClosing` in interface `WindowListener`

### windowClosed

public void windowClosed(WindowEvent e)

Specified by:
  `windowClosed` in interface `WindowListener`

### windowIconified

public void windowIconified(WindowEvent e)

Specified by:
  `windowIconified` in interface `WindowListener`

### windowDeiconified

public void windowDeiconified(WindowEvent e)

Specified by:
  `windowDeiconified` in interface `WindowListener`

### windowActivated

public void windowActivated(WindowEvent e)

Specified by:
  `windowActivated` in interface `WindowListener`

### windowDeactivated

public void windowDeactivated(WindowEvent e)

Specified by:
  `windowDeactivated` in interface `WindowListener`

### dispose

public void dispose()

### from3D

public void from3D()

### smiles

public String smiles()

Overrides:
  `smiles` in class `JME`

### inchi

public String inchi()

### to3D

public void to3D(boolean isAppend)

### setFrameVisible

public void setFrameVisible(boolean b)

### toMOL

protected void toMOL()

### toCDXML

protected void toCDXML()

### loadFile

public void loadFile(String fname)
When dropped, if the data are 2D, then read directly into JME. If 3D then transform via InChI to SMILES and then resolver to 2D.

Specified by:
  `loadFile` in interface `JmolDropEditor`

### setMol

protected boolean setMol(boolean checkMultipart)

Overrides:
  `setMol` in class `JME`

### loadContent

public void loadContent(String script)
Description copied from interface: `JmolDropEditor`
Deprecated. Designed to be used for dropping a script into the AppConsole or ScriptEditor in order to open it in the ScriptEditor, but that was never implemented.

Specified by:
  `loadContent` in interface `JmolDropEditor`
Parameters:
  `script` -

### main

public static void main(String[] args)