public class JMSketch extends AbstractMarvinApplet implements chemaxon.marvin.applet.JMSketchIface
JApplet.AccessibleJApplet
Applet.AccessibleApplet
Panel.AccessibleAWTPanel
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
debug, panel
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
JMSketch() |
Modifier and Type | Method and Description |
---|---|
void |
clean2D() |
void |
clean3D() |
protected void |
createGUI() |
String |
evaluateChemicalTerms(String expression) |
protected String |
evaluateChemicalTerms0(String expression,
chemaxon.struc.Molecule mol) |
String |
getAtomAlias(int i) |
int |
getAtomCharge(int atomNum)
Gets the charge of the specified atom, from the molecule currently used.
|
int |
getAtomCount() |
String |
getAtomExtraLabel(int i) |
int |
getAtomRadicalState(int atomNum)
Gets the radical state of the specified atom, from the molecule currently used.
|
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() |
int |
getDisconnectedFragmentsCount() |
protected chemaxon.struc.MDocument |
getDocInPanel() |
String |
getImageShowURL() |
String |
getMol(String fmt) |
double |
getMolExactMass() |
String |
getMolFormula() |
String[] |
getMolFrags(String fmt) |
String |
getMolImage(String fmt) |
protected chemaxon.struc.Molecule |
getMolInPanel() |
double |
getMolMass() |
String |
getMolProperty(String key) |
int |
getMolPropertyCount() |
String |
getMolPropertyKey(int i) |
protected chemaxon.marvin.sketch.swing.SketchPanel |
getPanel() |
String |
getPiece(String fmt) |
double |
getScale() |
String |
getSelectedMol(String fmt) |
boolean |
hasValenceError() |
boolean |
isAtomSelected(int i) |
boolean |
isEmpty() |
void |
mouseReleased(MouseEvent ev)
Handles the viewer button press events.
|
void |
postImage(String fmt,
String where) |
void |
redo() |
void |
selectAllAtoms(boolean v) |
void |
selectAtom(int atom,
boolean v) |
void |
setAbsoluteStereoFlag(boolean stereoFlag) |
void |
setAbsoluteStereoFlag0(Boolean stereoFlag) |
void |
setAtomAlias(int i,
String alias) |
void |
setAtomCharge(int atomNum,
int chg)
Sets the charge of the specified atom, from the molecule currently used.
|
void |
setAtomExtraLabel(int i,
String 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) |
void |
setMol(String s) |
void |
setMol(String s,
String opts) |
void |
setMolProperty(String key,
String value) |
void |
setPiece(String s) |
void |
setScale(double m) |
void |
start()
Starts the applet.
|
void |
undo() |
destroy, enqueueForPrivilegedProcessing, getAppletInBrowser, getAppletInfo, getCodeBase, getParameter, getSettingsForApplet, init, isChemicalTermsExpressionSyntaxError, mouseClicked, mouseEntered, mouseExited, mousePressed, propertyChange, setPanel, setParentApplet, stop, validateMoleculeStr, validateMoleculeStr
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
getAppletContext, getAudioClip, getAudioClip, getDocumentBase, getImage, getImage, getLocale, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus
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, transferFocusDownCycle, validate, validateTree
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, revalidate, 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, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected void createGUI()
createGUI
in class AbstractMarvinApplet
public void start()
AbstractMarvinApplet
start
in class AbstractMarvinApplet
protected chemaxon.marvin.sketch.swing.SketchPanel getPanel()
getPanel
in class AbstractMarvinApplet
protected chemaxon.struc.Molecule getMolInPanel()
protected chemaxon.struc.MDocument getDocInPanel()
public boolean isEmpty()
isEmpty
in interface chemaxon.marvin.applet.JMSketchIface
public String getSelectedMol(String fmt)
getSelectedMol
in interface chemaxon.marvin.applet.JMSketchIface
public String getMol(String fmt)
getMol
in interface chemaxon.marvin.applet.JMSketchIface
public String getMolImage(String fmt)
getMolImage
in interface chemaxon.marvin.applet.JMSketchIface
public String[] getMolFrags(String fmt)
getMolFrags
in interface chemaxon.marvin.applet.JMSketchIface
public int getDisconnectedFragmentsCount()
getDisconnectedFragmentsCount
in interface chemaxon.marvin.applet.JMSketchIface
public String getMolProperty(String key)
getMolProperty
in interface chemaxon.marvin.applet.JMSketchIface
public void setMolProperty(String key, String value)
setMolProperty
in interface chemaxon.marvin.applet.JMSketchIface
public int getMolPropertyCount()
getMolPropertyCount
in interface chemaxon.marvin.applet.JMSketchIface
public String getMolPropertyKey(int i)
getMolPropertyKey
in interface chemaxon.marvin.applet.JMSketchIface
public int getAtomCount()
getAtomCount
in interface chemaxon.marvin.applet.JMSketchIface
public boolean isAtomSelected(int i)
isAtomSelected
in interface chemaxon.marvin.applet.JMSketchIface
public void selectAllAtoms(boolean v)
selectAllAtoms
in interface chemaxon.marvin.applet.JMSketchIface
public void selectAtom(int atom, boolean v)
selectAtom
in interface chemaxon.marvin.applet.JMSketchIface
public void setAtomAlias(int i, String alias)
setAtomAlias
in interface chemaxon.marvin.applet.JMSketchIface
public String getAtomAlias(int i)
getAtomAlias
in interface chemaxon.marvin.applet.JMSketchIface
public void setAtomExtraLabel(int i, String label)
setAtomExtraLabel
in interface chemaxon.marvin.applet.JMSketchIface
public String getAtomExtraLabel(int i)
getAtomExtraLabel
in interface chemaxon.marvin.applet.JMSketchIface
public double getMolMass()
getMolMass
in interface chemaxon.marvin.applet.JMSketchIface
public double getMolExactMass()
getMolExactMass
in interface chemaxon.marvin.applet.JMSketchIface
public String getMolFormula()
getMolFormula
in interface chemaxon.marvin.applet.JMSketchIface
public String evaluateChemicalTerms(String expression)
evaluateChemicalTerms
in interface chemaxon.marvin.applet.JMSketchIface
protected String evaluateChemicalTerms0(String expression, chemaxon.struc.Molecule mol)
evaluateChemicalTerms0
in class AbstractMarvinApplet
public void setMol(String s)
setMol
in interface chemaxon.marvin.applet.JMSketchIface
public void setMol(String s, String opts)
setMol
in interface chemaxon.marvin.applet.JMSketchIface
public String getPiece(String fmt)
getPiece
in interface chemaxon.marvin.applet.JMSketchIface
public void setPiece(String s)
setPiece
in interface chemaxon.marvin.applet.JMSketchIface
public void postImage(String fmt, String where)
postImage
in interface chemaxon.marvin.applet.JMSketchIface
public void undo()
undo
in interface chemaxon.marvin.applet.JMSketchIface
public void redo()
redo
in interface chemaxon.marvin.applet.JMSketchIface
public void clean2D()
clean2D
in interface chemaxon.marvin.applet.JMSketchIface
public void clean3D()
clean3D
in interface chemaxon.marvin.applet.JMSketchIface
public String getImageShowURL()
getImageShowURL
in interface chemaxon.marvin.applet.JMSketchIface
public void setAutoScale(boolean as)
setAutoScale
in interface chemaxon.marvin.applet.JMSketchIface
public boolean getAutoScale()
getAutoScale
in interface chemaxon.marvin.applet.JMSketchIface
public double getScale()
getScale
in interface chemaxon.marvin.applet.JMSketchIface
public void setScale(double m)
setScale
in interface chemaxon.marvin.applet.JMSketchIface
public boolean hasValenceError()
hasValenceError
in interface chemaxon.marvin.applet.JMSketchIface
public void mouseReleased(MouseEvent ev)
mouseReleased
in interface MouseListener
mouseReleased
in class AbstractMarvinApplet
ev
- the event objectpublic String getAtomSymbol(int atomNum)
getAtomSymbol
in interface chemaxon.marvin.applet.JMSketchIface
atomNum
- the specified atom's number in the moleculepublic int getAtomValenceProperty(int atomNum)
getAtomValenceProperty
in interface chemaxon.marvin.applet.JMSketchIface
atomNum
- the specified atom's number in the moleculepublic void setAtomValenceProperty(int atomNum, int value)
setAtomValenceProperty
in interface chemaxon.marvin.applet.JMSketchIface
atomNum
- the specified atom's number in the moleculevalue
- valence property valuepublic int getAtomCharge(int atomNum)
getAtomCharge
in interface chemaxon.marvin.applet.JMSketchIface
atomNum
- the specified atom's number in the moleculepublic void setAtomCharge(int atomNum, int chg)
setAtomCharge
in interface chemaxon.marvin.applet.JMSketchIface
atomNum
- the specified atom's number in the moleculechg
- the chargepublic int getAtomRadicalState(int atomNum)
getAtomRadicalState
in interface chemaxon.marvin.applet.JMSketchIface
atomNum
- the specified atom's number in the moleculepublic void setAtomRadicalState(int atomNum, int radState)
setAtomRadicalState
in interface chemaxon.marvin.applet.JMSketchIface
atomNum
- the specified atom's number in the moleculeradState
- radical statepublic void setAbsoluteStereoFlag(boolean stereoFlag)
setAbsoluteStereoFlag
in interface chemaxon.marvin.applet.JMSketchIface
public void setAbsoluteStereoFlag0(Boolean stereoFlag)