chemaxon.marvin.applet
Class JMSketch

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by javax.swing.JApplet
                      extended by chemaxon.marvin.applet.AbstractMarvinApplet
                          extended by chemaxon.marvin.applet.JMSketch
All Implemented Interfaces:
chemaxon.marvin.applet.JMSketchIface, chemaxon.marvin.applet.MAppletIface, java.awt.event.MouseListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer

public class JMSketch
extends AbstractMarvinApplet
implements chemaxon.marvin.applet.JMSketchIface

Swing version of the MarvinSketch Applet.

Since:
Marvin 2.0
Version:
5.3, 11/08/2009
Author:
Peter Csizmadia, Nora Mate, Zsolt Mohacsi, Istvan Fajth, Tamas Vertse
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JApplet
javax.swing.JApplet.AccessibleJApplet
 
Nested classes/interfaces inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes/interfaces inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class chemaxon.marvin.applet.AbstractMarvinApplet
debug, panel
 
Fields inherited from class javax.swing.JApplet
accessibleContext, rootPane, rootPaneCheckingEnabled
 
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
JMSketch()
           
 
Method Summary
 void clean2D()
          Invokes the Clean2D command.
 void clean3D()
          Invokes the Clean3D command.
protected  void createGUI()
           
 java.lang.String evaluateChemicalTerms(java.lang.String expression)
          Evaluates a Chemical Terms expression on the molecule in MarvinSketch, and returns the result in string format.
protected  java.lang.String evaluateChemicalTerms0(java.lang.String expression, chemaxon.struc.Molecule mol)
           
 java.lang.String getAtomAlias(int i)
          Gets atom alias.
 int getAtomCharge(int atomNum)
          Gets the charge of the specified atom, from the molecule currently used.
 int getAtomCount()
          Returns the number of atoms.
 java.lang.String getAtomExtraLabel(int i)
          Gets extra atom label.
 int getAtomRadicalState(int atomNum)
          Gets the radical state of the specified atom, from the molecule currently used.
 java.lang.String getAtomSymbol(int atomNum)
          Gets the atom symbol of the specified atom, from the molecule currently used.
 int getAtomValenceProperty(int atomNum)
          Gets the valence property of the specified atom, from the molecule currently used.
 boolean getAutoScale()
          Returns the autoscale property.
protected  chemaxon.struc.MDocument getDocInPanel()
           
 java.lang.String getImageShowURL()
          Gets the show image URL.
 java.lang.String getMol(java.lang.String fmt)
          Gets the molecule in a text format.
 double getMolExactMass()
          Gets the exact molecule weight.
 java.lang.String getMolFormula()
          Gets the molecule formula.
protected  chemaxon.struc.Molecule getMolInPanel()
           
 double getMolMass()
          Gets the molecule weight.
 java.lang.String getMolProperty(java.lang.String key)
          Gets an RDfile/SDfile property.
 int getMolPropertyCount()
          Gets the number of RDfile/SDfile properties.
 java.lang.String getMolPropertyKey(int i)
          Gets an RDfile/SDfile property key.
protected  chemaxon.marvin.sketch.swing.SketchPanel getPanel()
           
 java.lang.String getPiece(java.lang.String fmt)
          Gets the current molecule piece in the specified format.
 double getScale()
          Gets the magnification.
 java.lang.String getSelectedMol(java.lang.String fmt)
          Gets the selected molecule part in a text format.
 boolean hasValenceError()
          Determines if this molecule has a valence error on any of its atoms.
 boolean isAtomSelected(int i)
          Returns true if atom is selected.
 boolean isEmpty()
          Returns true sketcher canvas is empty.
 void mouseReleased(java.awt.event.MouseEvent ev)
          Handles the viewer button press events.
 void postImage(java.lang.String fmt, java.lang.String where)
          Posts image to CGI script.
 void redo()
          Invokes the Redo command.
 void selectAllAtoms(boolean v)
          Select or unselect all atoms in the specified molecule.
 void selectAtom(int atom, boolean v)
          Select or unselect an atom in the specified molecule.
 void setAbsoluteStereoFlag(boolean stereoFlag)
           
 void setAbsoluteStereoFlag0(java.lang.Boolean stereoFlag)
           
 void setAtomAlias(int i, java.lang.String alias)
          Sets atom alias.
 void setAtomCharge(int atomNum, int chg)
          Sets the charge of the specified atom, from the molecule currently used.
 void setAtomExtraLabel(int i, java.lang.String label)
          Sets extra atom label.
 void setAtomRadicalState(int atomNum, int radState)
          Sets the radical state of the specified atom, from the molecule currently used.
 void setAtomValenceProperty(int atomNum, int value)
          Sets the valence property of the specified atom, from the molecule currently used.
 void setAutoScale(boolean as)
          Sets the autoscale property.
 void setMol(java.lang.String s)
          Starts loading a molecule into the sketcher in a separate thread.
 void setMol(java.lang.String s, java.lang.String opts)
          Starts loading a molecule into the sketcher in a separate thread.
 void setMolProperty(java.lang.String key, java.lang.String value)
          Sets an RDfile/SDfile property.
 void setPiece(java.lang.String s)
          Sets the current piece.
 void setScale(double m)
          Sets the magnification.
 void start()
          Starts the applet.
 void undo()
          Invokes the Undo command.
 
Methods inherited from class chemaxon.marvin.applet.AbstractMarvinApplet
destroy, enqueueForPrivilegedProcessing, getAppletInBrowser, getAppletInfo, getCodeBase, getParameter, init, isChemicalTermsExpressionSyntaxError, mouseClicked, mouseEntered, mouseExited, mousePressed, propertyChange, setPanel, setParentApplet, stop, validateMoleculeStr, validateMoleculeStr
 
Methods inherited from class javax.swing.JApplet
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.applet.Applet
getAppletContext, getAudioClip, getAudioClip, getDocumentBase, getImage, getImage, getLocale, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, 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, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, 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, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface chemaxon.marvin.applet.JMSketchIface
mouseClicked, mouseEntered, mouseExited, mousePressed
 
Methods inherited from interface chemaxon.marvin.applet.MAppletIface
isChemicalTermsExpressionSyntaxError, setParentApplet, validateMoleculeStr, validateMoleculeStr
 

Constructor Detail

JMSketch

public JMSketch()
Method Detail

createGUI

protected void createGUI()
Specified by:
createGUI in class AbstractMarvinApplet

start

public void start()
Description copied from class: AbstractMarvinApplet
Starts the applet.

Overrides:
start in class AbstractMarvinApplet

getPanel

protected chemaxon.marvin.sketch.swing.SketchPanel getPanel()
Specified by:
getPanel in class AbstractMarvinApplet

getMolInPanel

protected chemaxon.struc.Molecule getMolInPanel()

getDocInPanel

protected chemaxon.struc.MDocument getDocInPanel()

isEmpty

public boolean isEmpty()
Returns true sketcher canvas is empty.

Specified by:
isEmpty in interface chemaxon.marvin.applet.JMSketchIface
Returns:
true if sketcher canvas is empty
Since:
Marvin 3.5.1

getSelectedMol

public java.lang.String getSelectedMol(java.lang.String fmt)
Gets the selected molecule part in a text format. Should be called after the molecule has been loaded. The format descriptor string can also contain export options. Format and options are separated by a colon, multiple options can be separated by commas. See the text formats and their options on the File Formats in Marvin page. Examples:
 s1 = msketch.getSelectedMol("mol");
 s2 = msketch.getSelectedMol("smiles:a-H"); // aromatize and remove Hydrogens
 

Specified by:
getSelectedMol in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
fmt - the format descriptor string
Returns:
string containing the molecule in a molecule file format
Since:
Marvin 4.0.2

getMol

public java.lang.String getMol(java.lang.String fmt)
Gets the molecule in a text format. Should be called after the molecule has been loaded. The format descriptor string can also contain export options. Format and options are separated by a colon, multiple options can be separated by commas. See the text formats and their options on the File Formats in Marvin page. Examples:
 s1 = msketch.getMol("mol");
 s2 = msketch.getMol("smiles:a-H"); // aromatize and remove Hydrogens
 

Specified by:
getMol in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
fmt - the format descriptor string
Returns:
string containing the molecule in a molecule file format

getMolProperty

public java.lang.String getMolProperty(java.lang.String key)
Gets an RDfile/SDfile property. Should be called after the molecule has been loaded.

Specified by:
getMolProperty in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
key - the property key
Returns:
the value of the property, or null if the key is not found
Since:
Marvin 3.4.1

setMolProperty

public void setMolProperty(java.lang.String key,
                           java.lang.String value)
Sets an RDfile/SDfile property. Setting null value removes the property. Should be called after the molecule has been loaded.

Specified by:
setMolProperty in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
key - the property name
value - the value or null
Since:
Marvin 3.4.1

getMolPropertyCount

public int getMolPropertyCount()
Gets the number of RDfile/SDfile properties. Should be called after the molecule has been loaded.

Specified by:
getMolPropertyCount in interface chemaxon.marvin.applet.JMSketchIface
Returns:
the number of RDfile/SDfile properties
Since:
Marvin 3.5

getMolPropertyKey

public java.lang.String getMolPropertyKey(int i)
Gets an RDfile/SDfile property key. Should be called after the molecule has been loaded.

Specified by:
getMolPropertyKey in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
i - the property key index
Returns:
the property key
Since:
Marvin 3.5

getAtomCount

public int getAtomCount()
Returns the number of atoms. Should be called after the molecule has been loaded.

Specified by:
getAtomCount in interface chemaxon.marvin.applet.JMSketchIface
Returns:
the number of atoms
Since:
Marvin 3.5.1

isAtomSelected

public boolean isAtomSelected(int i)
Returns true if atom is selected. Should be called after the molecule has been loaded.

Specified by:
isAtomSelected in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
i - the atom index
Returns:
true if atom is selected
Since:
Marvin 3.5.1

selectAllAtoms

public void selectAllAtoms(boolean v)
Select or unselect all atoms in the specified molecule.

Specified by:
selectAllAtoms in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
v - select (true) or unselect (false)
Since:
Marvin 5.0.3, 03/25/2008

selectAtom

public void selectAtom(int atom,
                       boolean v)
Select or unselect an atom in the specified molecule.

Specified by:
selectAtom in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
atom - atom index
v - select (true) or unselect (false)
Since:
Marvin 5.0.3, 03/25/2008

setAtomAlias

public void setAtomAlias(int i,
                         java.lang.String alias)
Sets atom alias. Should be called after the molecule has been loaded.

Specified by:
setAtomAlias in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
i - the atom index
alias - the alias
Since:
Marvin 3.5

getAtomAlias

public java.lang.String getAtomAlias(int i)
Gets atom alias. Should be called after the molecule has been loaded.

Specified by:
getAtomAlias in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
i - the atom index
Returns:
the atom alias
Since:
Marvin 3.5

setAtomExtraLabel

public void setAtomExtraLabel(int i,
                              java.lang.String label)
Sets extra atom label. Should be called after the molecule has been loaded.

Specified by:
setAtomExtraLabel in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
i - the atom index
label - the extra atom label
Since:
Marvin 3.5

getAtomExtraLabel

public java.lang.String getAtomExtraLabel(int i)
Gets extra atom label. Should be called after the molecule has been loaded.

Specified by:
getAtomExtraLabel in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
i - the atom index
Returns:
the extra atom label
Since:
Marvin 3.5

getMolMass

public double getMolMass()
Gets the molecule weight. Should be called after the molecule has been loaded.

Specified by:
getMolMass in interface chemaxon.marvin.applet.JMSketchIface
Returns:
the molecule weight
Since:
Marvin 4.0.2

getMolExactMass

public double getMolExactMass()
Gets the exact molecule weight. Should be called after the molecule has been loaded.

Specified by:
getMolExactMass in interface chemaxon.marvin.applet.JMSketchIface
Returns:
the exact molecule weight
Since:
Marvin 4.0.2

getMolFormula

public java.lang.String getMolFormula()
Gets the molecule formula. Should be called after the molecule has been loaded.

Specified by:
getMolFormula in interface chemaxon.marvin.applet.JMSketchIface
Returns:
the molecule formula
Since:
Marvin 4.0.2

evaluateChemicalTerms

public java.lang.String evaluateChemicalTerms(java.lang.String expression)
Evaluates a Chemical Terms expression on the molecule in MarvinSketch, and returns the result in string format. Should be called after the molecule has been loaded.

Examples:
 s1 = MSketch.evaluateChemicalTerms("atomCount()");
 s2 = MSketch.evaluateChemicalTerms("logP() <= 5");
 
See the Chemical Terms Language Reference and the Chemical Terms Reference Tables for more.

Specified by:
evaluateChemicalTerms in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
expression - the Chemical Terms expression
Returns:
the result of the evaluation
Since:
Marvin 5.1

evaluateChemicalTerms0

protected java.lang.String evaluateChemicalTerms0(java.lang.String expression,
                                                  chemaxon.struc.Molecule mol)
Overrides:
evaluateChemicalTerms0 in class AbstractMarvinApplet

setMol

public void setMol(java.lang.String s)
Starts loading a molecule into the sketcher in a separate thread.

Specified by:
setMol in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
s - molfile contents, URL or (Unix) filename

setMol

public void setMol(java.lang.String s,
                   java.lang.String opts)
Starts loading a molecule into the sketcher in a separate thread. The file format and/or import options can be specified if the second argument is in one of the following forms: "options", "format:", or "format:options". See the text formats and their options on the File Formats in Marvin page.

Specified by:
setMol in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
s - molfile contents, URL or (Unix) filename
opts - options or null
Since:
Marvin 3.3

getPiece

public java.lang.String getPiece(java.lang.String fmt)
Gets the current molecule piece in the specified format. Should be called after the molecule has been loaded.

Specified by:
getPiece in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
fmt - the format
Returns:
the molecule in a molecule file format
Since:
Marvin 2.2
See Also:
JMSketchIface.getMol(java.lang.String)

setPiece

public void setPiece(java.lang.String s)
Sets the current piece. This method makes it possible to implement the Periodic Table of elements and tables of template molecules as external JavaScript/HTML components.

Specified by:
setPiece in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
s - string containing the molecule in a molecule file format

postImage

public void postImage(java.lang.String fmt,
                      java.lang.String where)
Posts image to CGI script. This method is experimental. Do not use it yet!

Specified by:
postImage in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
fmt - image file format: "jpeg", "png" or "ppm"
Since:
Marvin 2.9.12

undo

public void undo()
Invokes the Undo command.

Specified by:
undo in interface chemaxon.marvin.applet.JMSketchIface
Since:
Marvin 4.1.2

redo

public void redo()
Invokes the Redo command.

Specified by:
redo in interface chemaxon.marvin.applet.JMSketchIface
Since:
Marvin 4.1.2

clean2D

public void clean2D()
Invokes the Clean2D command.

Specified by:
clean2D in interface chemaxon.marvin.applet.JMSketchIface
Since:
Marvin 5.3

clean3D

public void clean3D()
Invokes the Clean3D command.

Specified by:
clean3D in interface chemaxon.marvin.applet.JMSketchIface
Since:
Marvin 5.3

getImageShowURL

public java.lang.String getImageShowURL()
Gets the show image URL.

Specified by:
getImageShowURL in interface chemaxon.marvin.applet.JMSketchIface
Returns:
the URL or null

setAutoScale

public void setAutoScale(boolean as)
Sets the autoscale property. If autoscale is true the molecule is sized to fit on the molecule panel.

Specified by:
setAutoScale in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
as - true to switch on, false to switch off autoscale
Since:
Marvin 2.9.3

getAutoScale

public boolean getAutoScale()
Returns the autoscale property.

Specified by:
getAutoScale in interface chemaxon.marvin.applet.JMSketchIface
Returns:
true if autoscale is on, false if off
Since:
Marvin 2.9.3

getScale

public double getScale()
Gets the magnification.

Specified by:
getScale in interface chemaxon.marvin.applet.JMSketchIface
Returns:
the scaling factor
Since:
Marvin 2.2

setScale

public void setScale(double m)
Sets the magnification. Changes the mag parameter at runtime.

Specified by:
setScale in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
m - the scaling factor

hasValenceError

public boolean hasValenceError()
Determines if this molecule has a valence error on any of its atoms.

Specified by:
hasValenceError in interface chemaxon.marvin.applet.JMSketchIface
Returns:
true if there is an atom with valence error, false if there is no valence error
Since:
Marvin 4.1.3 11/13/2006

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent ev)
Handles the viewer button press events.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class AbstractMarvinApplet
Parameters:
ev - the event object

getAtomSymbol

public java.lang.String getAtomSymbol(int atomNum)
Gets the atom symbol of the specified atom, from the molecule currently used.

Specified by:
getAtomSymbol in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
atomNum - the specified atom's number in the molecule
Returns:
atom symbol

getAtomValenceProperty

public int getAtomValenceProperty(int atomNum)
Gets the valence property of the specified atom, from the molecule currently used.

Specified by:
getAtomValenceProperty in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
atomNum - the specified atom's number in the molecule
Returns:
valence property

setAtomValenceProperty

public void setAtomValenceProperty(int atomNum,
                                   int value)
Sets the valence property of the specified atom, from the molecule currently used.

Specified by:
setAtomValenceProperty in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
atomNum - the specified atom's number in the molecule
value - valence property value

getAtomCharge

public int getAtomCharge(int atomNum)
Gets the charge of the specified atom, from the molecule currently used.

Specified by:
getAtomCharge in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
atomNum - the specified atom's number in the molecule
Returns:
the charge

setAtomCharge

public void setAtomCharge(int atomNum,
                          int chg)
Sets the charge of the specified atom, from the molecule currently used.

Specified by:
setAtomCharge in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
atomNum - the specified atom's number in the molecule
chg - the charge

getAtomRadicalState

public int getAtomRadicalState(int atomNum)
Gets the radical state of the specified atom, from the molecule currently used.

Specified by:
getAtomRadicalState in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
atomNum - the specified atom's number in the molecule
Returns:
radical state

setAtomRadicalState

public void setAtomRadicalState(int atomNum,
                                int radState)
Sets the radical state of the specified atom, from the molecule currently used.

Specified by:
setAtomRadicalState in interface chemaxon.marvin.applet.JMSketchIface
Parameters:
atomNum - the specified atom's number in the molecule
radState - radical state

setAbsoluteStereoFlag

public void setAbsoluteStereoFlag(boolean stereoFlag)
Specified by:
setAbsoluteStereoFlag in interface chemaxon.marvin.applet.JMSketchIface

setAbsoluteStereoFlag0

public void setAbsoluteStereoFlag0(java.lang.Boolean stereoFlag)