|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
javax.swing.JApplet
chemaxon.marvin.applet.AbstractMarvinApplet
chemaxon.marvin.applet.JMView
public class JMView
Swing version of the MarvinView Applet.
| 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 | |
|---|---|
JMView()
|
|
| Method Summary | |
|---|---|
void |
addMol(java.lang.String s)
Starts loading molecules in a separate thread. |
void |
addMol(java.lang.String s,
java.lang.String opts)
Starts loading molecules in a separate thread. |
void |
animate(java.lang.String arg)
Starts or stops animation. |
protected void |
createGUI()
|
java.lang.String |
evaluateChemicalTerms(java.lang.String expression,
int n)
Evaluates a Chemical Terms expression on the molecule in given cell, 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 n,
int i)
Gets atom alias. |
int |
getAtomCount(int i)
Gets the number of atoms in the specified molecule cell. |
java.lang.String |
getAtomExtraLabel(int n,
int i)
Gets extra atom label. |
double |
getBestTabScale()
Gets the smallest best scale value in the molecule table. |
double |
getBestTabScale(int i)
Gets the best scale value for a molecule cell. |
boolean |
getC(int i)
Gets the state of a checkbox. |
int |
getCellCount()
Gets the number of cells in the table. |
java.lang.String |
getL(int i)
Gets a label. |
java.lang.String |
getM(int n,
java.lang.String fmt)
Gets the nth molecule in a text format. |
double |
getMolExactMass(int n)
Gets the exact molecule weight. |
java.lang.String |
getMolFormula(int n)
Gets the molecule formula. |
double |
getMolMass(int n)
Gets the molecule weight. |
java.lang.String |
getMProperty(int n,
java.lang.String key)
Gets an RDfile/SDfile property. |
int |
getMPropertyCount(int n)
Gets the number of RDfile/SDfile properties. |
java.lang.String |
getMPropertyKey(int n,
int i)
Gets an RDfile/SDfile property key. |
protected chemaxon.marvin.view.swing.ViewPanel |
getPanel()
|
int |
getSelectedIndex()
Gets the index of the molecule that is selected by the user. |
java.lang.String |
getT(int i)
Gets the value of a text field. |
double |
getTabScale(int i)
Gets the magnification for a molecule cell. |
boolean |
hasValenceError(int i)
Determines if the molecule in the specified cell has a valence error on any of its atoms. |
boolean |
isAtomSetVisible(int id)
Is the specified atom set visible? |
boolean |
isEmpty(int n)
Returns true if molecule cell is empty. |
boolean |
isSelected(int i,
int atom)
Is the specified atom selected? |
void |
mouseClicked(java.awt.event.MouseEvent e)
Does nothing. |
boolean |
selectAllAtoms(int i,
boolean v)
Select or unselect all atoms in the specified molecule. |
boolean |
selectAtom(int i,
int atom,
boolean v)
Select or unselect an atom in the specified molecule. |
void |
setActionB(int i,
java.lang.String s)
Sets the action string (URL or JavaScript expression) of a button. |
void |
setActionC(int i,
boolean c,
java.lang.String s)
Sets one of the two action strings (JavaScript expressions) of a checkbox. |
void |
setAtomAlias(int n,
int i,
java.lang.String alias)
Sets atom alias. |
void |
setAtomExtraLabel(int n,
int i,
java.lang.String label)
Sets extra atom label. |
void |
setAtomSetColor(int i,
int rgb)
Sets the color of an atom set. |
boolean |
setAtomSetSeq(int i,
int atom,
int id)
Sets the set sequence number of the atom. |
void |
setAtomSetVisible(int id,
boolean v)
Set the visibility of the specified atom set. |
void |
setBondSetColor(int i,
int rgb)
Sets the color of a bond set. |
boolean |
setBondSetSeq(int i,
int j1,
int j2,
int id)
Sets the set sequence number of a bond. |
boolean |
setBondSetSeqAll(int i,
int id)
Sets the set sequence number for each bond. |
void |
setC(int i,
boolean s)
Sets the state of a checkbox. |
void |
setL(int i,
java.lang.String s)
Sets a label. |
void |
setM(int n,
java.lang.String s)
Starts loading a molecule into the nth cell in a separate thread. |
void |
setM(int n,
java.lang.String s,
java.lang.String opts)
Starts loading a molecule into the nth cell in a separate thread. |
void |
setMol(java.lang.String s)
Starts loading molecules in a separate thread. |
void |
setMol(java.lang.String s,
java.lang.String opts)
Starts loading molecules in a separate thread. |
void |
setMProperty(int n,
java.lang.String key,
java.lang.String value)
Sets an RDfile/SDfile property. |
void |
setSelectedIndex(int i)
Selects a molecule. |
void |
setT(int i,
java.lang.String s)
Gets the value of a text field. |
void |
start()
Starts the applet. |
void |
stop()
Stops the applet. |
| Methods inherited from class chemaxon.marvin.applet.AbstractMarvinApplet |
|---|
destroy, enqueueForPrivilegedProcessing, getAppletInBrowser, getAppletInfo, getCodeBase, getParameter, init, isChemicalTermsExpressionSyntaxError, mouseEntered, mouseExited, mousePressed, mouseReleased, propertyChange, setPanel, setParentApplet, 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.MAppletIface |
|---|
isChemicalTermsExpressionSyntaxError, setParentApplet, validateMoleculeStr, validateMoleculeStr |
| Constructor Detail |
|---|
public JMView()
| Method Detail |
|---|
protected void createGUI()
createGUI in class AbstractMarvinAppletprotected chemaxon.marvin.view.swing.ViewPanel getPanel()
getPanel in class AbstractMarvinAppletpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class AbstractMarvinAppletpublic void stop()
stop in class AbstractMarvinAppletpublic void start()
AbstractMarvinApplet
start in class AbstractMarvinAppletpublic void animate(java.lang.String arg)
MView.animate("all"); // starts animating all molecules
MView.animate("off"); // stops animating all molecules
MView.animate("3"); // starts animation in cell 3
MView.animate("0,1,2"); // starts animation in cells 0, 1 and 2
MView.animate("-1,-2,-3"); // stops animation in cells 0, 1 and 2
animate in interface chemaxon.marvin.applet.JMViewIfacearg - "off", "all" or a
comma separated list of integerspublic boolean isEmpty(int n)
true if molecule cell is empty.
isEmpty in interface chemaxon.marvin.applet.JMViewIfacen - molecule cell number
true if molecule cell is empty
public java.lang.String getM(int n,
java.lang.String fmt)
s1 = mview.getM(0, "mol"); s2 = mview.getM(0, "smiles:a-H"); // aromatize and remove Hydrogens
getM in interface chemaxon.marvin.applet.JMViewIfacen - molecule cell numberfmt - the format descriptor string
public java.lang.String getMProperty(int n,
java.lang.String key)
getMProperty in interface chemaxon.marvin.applet.JMViewIfacen - molecule cell numberkey - the property key
public void setMProperty(int n,
java.lang.String key,
java.lang.String value)
setMProperty in interface chemaxon.marvin.applet.JMViewIfacen - molecule cell numberkey - the property namevalue - the value or nullpublic int getMPropertyCount(int n)
getMPropertyCount in interface chemaxon.marvin.applet.JMViewIfacen - molecule cell number
public java.lang.String getMPropertyKey(int n,
int i)
getMPropertyKey in interface chemaxon.marvin.applet.JMViewIfacen - molecule cell numberi - the property key index
public void setAtomAlias(int n,
int i,
java.lang.String alias)
setAtomAlias in interface chemaxon.marvin.applet.JMViewIfacen - molecule cell numberi - the atom indexalias - the alias
public java.lang.String getAtomAlias(int n,
int i)
getAtomAlias in interface chemaxon.marvin.applet.JMViewIfacen - molecule cell numberi - the atom index
public void setAtomExtraLabel(int n,
int i,
java.lang.String label)
setAtomExtraLabel in interface chemaxon.marvin.applet.JMViewIfacen - molecule cell numberi - the atom indexlabel - the extra atom label
public java.lang.String getAtomExtraLabel(int n,
int i)
getAtomExtraLabel in interface chemaxon.marvin.applet.JMViewIfacen - molecule cell numberi - the atom index
public double getMolMass(int n)
getMolMass in interface chemaxon.marvin.applet.JMViewIfacen - molecule cell number
public double getMolExactMass(int n)
getMolExactMass in interface chemaxon.marvin.applet.JMViewIfacen - molecule cell number
public java.lang.String getMolFormula(int n)
getMolFormula in interface chemaxon.marvin.applet.JMViewIfacen - molecule cell number
public java.lang.String evaluateChemicalTerms(java.lang.String expression,
int n)
s1 = MView.evaluateChemicalTerms("atomCount()", 0);
s2 = MView.evaluateChemicalTerms("logP() <= 5", 1);
See the
Chemical Terms Language Reference and the
Chemical Terms Reference Tables for more.
evaluateChemicalTerms in interface chemaxon.marvin.applet.JMViewIfaceexpression - the Chemical Terms expressionn - molecule cell number
protected java.lang.String evaluateChemicalTerms0(java.lang.String expression,
chemaxon.struc.Molecule mol)
evaluateChemicalTerms0 in class AbstractMarvinAppletpublic void addMol(java.lang.String s)
addMol in interface chemaxon.marvin.applet.JMViewIfaces - molecule file contents, URL, or (Unix) filename
public void addMol(java.lang.String s,
java.lang.String opts)
addMol in interface chemaxon.marvin.applet.JMViewIfaces - molecule file contents, URL, or (Unix) filenameopts - options or nullpublic void setMol(java.lang.String s)
setMol in interface chemaxon.marvin.applet.JMViewIfaces - molecule file contents, URL, or (Unix) filename
public void setMol(java.lang.String s,
java.lang.String opts)
setMol in interface chemaxon.marvin.applet.JMViewIfaces - molecule file contents, URL, or (Unix) filenameopts - options or null
public void setM(int n,
java.lang.String s)
setM in interface chemaxon.marvin.applet.JMViewIfacen - molecule cell number (0 for simple viewer)s - molecule file contents, URL, or (Unix) filename
public void setM(int n,
java.lang.String s,
java.lang.String opts)
setM in interface chemaxon.marvin.applet.JMViewIfacen - molecule cell number (0 for simple viewer)s - molecule file contents, URL, or (Unix) filenameopts - options or nullpublic java.lang.String getL(int i)
getL in interface chemaxon.marvin.applet.JMViewIfacei - the label index
public void setL(int i,
java.lang.String s)
setL in interface chemaxon.marvin.applet.JMViewIfacei - the label indexs - the labelpublic boolean getC(int i)
getC in interface chemaxon.marvin.applet.JMViewIfacei - the checkbox index
public void setC(int i,
boolean s)
setC in interface chemaxon.marvin.applet.JMViewIfacei - the checkbox indexs - true to check, false to uncheck
public void setActionB(int i,
java.lang.String s)
setActionB in interface chemaxon.marvin.applet.JMViewIfacei - the button numbers - action string
public void setActionC(int i,
boolean c,
java.lang.String s)
setActionC in interface chemaxon.marvin.applet.JMViewIfacei - the button numberc - checked (true) or unchecked (false) states - action stringpublic java.lang.String getT(int i)
getT in interface chemaxon.marvin.applet.JMViewIfacei - the text field index
public void setT(int i,
java.lang.String s)
setT in interface chemaxon.marvin.applet.JMViewIfacei - the text field indexs - the textpublic int getCellCount()
getCellCount in interface chemaxon.marvin.applet.JMViewIfacepublic int getSelectedIndex()
getSelectedIndex in interface chemaxon.marvin.applet.JMViewIfacepublic void setSelectedIndex(int i)
setSelectedIndex in interface chemaxon.marvin.applet.JMViewIfacei - the cell index or -1 to unselectpublic int getAtomCount(int i)
getAtomCount in interface chemaxon.marvin.applet.JMViewIfacei - molecule cell index
public boolean selectAllAtoms(int i,
boolean v)
selectAllAtoms in interface chemaxon.marvin.applet.JMViewIfacei - molecule cell indexv - select (true) or unselect (false)
public boolean selectAtom(int i,
int atom,
boolean v)
selectAtom in interface chemaxon.marvin.applet.JMViewIfacei - molecule cell indexatom - atom indexv - select (true) or unselect (false)
public boolean isSelected(int i,
int atom)
isSelected in interface chemaxon.marvin.applet.JMViewIfacei - molecule cell indexatom - atom index
public boolean isAtomSetVisible(int id)
isAtomSetVisible in interface chemaxon.marvin.applet.JMViewIfaceid - atom set identifier (0, ..., 63)
public void setAtomSetVisible(int id,
boolean v)
setAtomSetVisible in interface chemaxon.marvin.applet.JMViewIfaceid - atom set identifier (0, ..., 63)v - visibility
public void setAtomSetColor(int i,
int rgb)
setAtomSetColor in interface chemaxon.marvin.applet.JMViewIfacei - atom set identifier (0, ..., 63)rgb - 24-bit RGB color value
public boolean setAtomSetSeq(int i,
int atom,
int id)
setAtomSetSeq in interface chemaxon.marvin.applet.JMViewIfacei - molecule cell indexatom - atom indexid - a number between 0 and 63. 0 is the default set.
It contains all atoms that are not in another set.
public void setBondSetColor(int i,
int rgb)
setBondSetColor in interface chemaxon.marvin.applet.JMViewIfacei - bond set identifier (1, ..., 63)rgb - 24-bit RGB color value
public boolean setBondSetSeq(int i,
int j1,
int j2,
int id)
setBondSetSeq in interface chemaxon.marvin.applet.JMViewIfacei - molecule cell indexj1 - first atom indexj2 - second atom indexid - a number between 0 and 31
public boolean setBondSetSeqAll(int i,
int id)
setBondSetSeqAll in interface chemaxon.marvin.applet.JMViewIfacei - molecule cell indexid - a number between 0 and 31
public double getTabScale(int i)
getTabScale in interface chemaxon.marvin.applet.JMViewIfacei - molecule cell index
public double getBestTabScale(int i)
getBestTabScale in interface chemaxon.marvin.applet.JMViewIfacei - the cell index
public double getBestTabScale()
getBestTabScale in interface chemaxon.marvin.applet.JMViewIfacepublic boolean hasValenceError(int i)
hasValenceError in interface chemaxon.marvin.applet.JMViewIfacei - the cell index
true if there is an atom with valence error,
false if there is no valence error or there is no molecule in the cell
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||