chemaxon.marvin.sketch
Class BondSM

java.lang.Object
  extended bychemaxon.marvin.sketch.SketchMode
      extended bychemaxon.marvin.sketch.BondSM
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, StereoConstants

public class BondSM
extends SketchMode
implements StereoConstants

Bond drawing mode. This class is under development, use it at your own risk!

Since:
Marvin 3.5, 07/08/2004
Version:
4.1.1, 08/16/2006
Author:
Peter Csizmadia
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface chemaxon.struc.StereoConstants
ATOMSTEREO_EITHER, ATOMSTEREO_MASK, ATOMSTEREO_NONE, ATOMSTEREO_SPECIFIC, CHIRALITY_MASK, CHIRALITY_R, CHIRALITY_S, CHIRALITYSUPPORT_ALL, CHIRALITYSUPPORT_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_ODD, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, TRANS
 
Constructor Summary
protected BondSM(BondSM sm)
           
  BondSM(chemaxon.marvin.sketch.MolEditor e, int flags)
          Creates a sketcher bond object for the specified molecule editor.
  BondSM(chemaxon.marvin.sketch.MolEditor e, MolBond b)
          Creates a sketcher bond object for the specified molecule editor.
 
Method Summary
 int buttonDown(boolean dblClick, int modifiers)
           
 int buttonUp(int modifiers, boolean doHist)
           
 boolean canPointToAtom()
          Can the user point to an atom in this sketching mode?
 boolean canPointToBond()
          Can the user point to a bond in this sketching mode?
 boolean canPointToSgroup()
          Can the user point to an S-group in this sketching mode?
 java.lang.Object clone()
           
 boolean containedObjectEquals(SketchMode o)
           
static Molecule createBondMol(int f)
           
static Molecule createBondMol(int f, MolAtom a1, MolAtom a2)
           
 Molecule getMol()
          Gets a molecule instance corresponding to this bond object.
 int getType()
           
 void hilitJoins(chemaxon.marvin.sketch.MolJoin j, chemaxon.marvin.util.MolPainter p, MoleculeGraph m, MoleculeGraph frag, double sr, java.awt.Graphics g)
           
 boolean isFloatingObjectPainted()
          Tests whether the floating object is visible.
 void moveTo(DPoint3 o)
           
 boolean pointerCopyDrag(int modifiers)
           
 boolean pointerDrag(int modifiers)
           
 boolean pointerMove(int modifiers)
           
 void setType(int type)
           
 
Methods inherited from class chemaxon.marvin.sketch.SketchMode
canPointToAtomPair, canPointToMObject, getAtomPairLocationWeights, getEditor, getPointableAtomPairs, getPointableAtoms, getPointableBonds, getPointedAtomPairMinDstRatio2, getSelectUtil, initSketchMode, isCurrentJoinHighlighted, isRubber, isTemporaryObjectPaintingNeeded, modkeyChange, paintTemporaryObject, paintTemps1, prepareMolPaint, reset, setMol, willBranchAtButtonPress
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BondSM

public BondSM(chemaxon.marvin.sketch.MolEditor e,
              int flags)
Creates a sketcher bond object for the specified molecule editor.

Parameters:
e - the molecule editor
flags - the bond flags

BondSM

public BondSM(chemaxon.marvin.sketch.MolEditor e,
              MolBond b)
Creates a sketcher bond object for the specified molecule editor.

Parameters:
e - the molecule editor
b - the bond

BondSM

protected BondSM(BondSM sm)
Method Detail

getType

public int getType()

setType

public void setType(int type)

containedObjectEquals

public boolean containedObjectEquals(SketchMode o)
Specified by:
containedObjectEquals in class SketchMode

clone

public java.lang.Object clone()
Specified by:
clone in class SketchMode

getMol

public Molecule getMol()
Gets a molecule instance corresponding to this bond object.

Overrides:
getMol in class SketchMode
Returns:
a molecule containing two atoms and a bond

moveTo

public void moveTo(DPoint3 o)
Overrides:
moveTo in class SketchMode

createBondMol

public static Molecule createBondMol(int f)

createBondMol

public static Molecule createBondMol(int f,
                                     MolAtom a1,
                                     MolAtom a2)

canPointToAtom

public boolean canPointToAtom()
Can the user point to an atom in this sketching mode?

Overrides:
canPointToAtom in class SketchMode
Returns:
true

canPointToBond

public boolean canPointToBond()
Can the user point to a bond in this sketching mode?

Overrides:
canPointToBond in class SketchMode
Returns:
true

canPointToSgroup

public boolean canPointToSgroup()
Can the user point to an S-group in this sketching mode?

Overrides:
canPointToSgroup in class SketchMode
Returns:
true

hilitJoins

public void hilitJoins(chemaxon.marvin.sketch.MolJoin j,
                       chemaxon.marvin.util.MolPainter p,
                       MoleculeGraph m,
                       MoleculeGraph frag,
                       double sr,
                       java.awt.Graphics g)
Overrides:
hilitJoins in class SketchMode

isFloatingObjectPainted

public boolean isFloatingObjectPainted()
Tests whether the floating object is visible.

Overrides:
isFloatingObjectPainted in class SketchMode
Returns:
true if it is visible, false otherwise
Since:
Marvin 4.1, 01/27/2006

buttonDown

public int buttonDown(boolean dblClick,
                      int modifiers)
Specified by:
buttonDown in class SketchMode

buttonUp

public int buttonUp(int modifiers,
                    boolean doHist)
Specified by:
buttonUp in class SketchMode

pointerMove

public boolean pointerMove(int modifiers)
Specified by:
pointerMove in class SketchMode

pointerDrag

public boolean pointerDrag(int modifiers)
Specified by:
pointerDrag in class SketchMode

pointerCopyDrag

public boolean pointerCopyDrag(int modifiers)
Specified by:
pointerCopyDrag in class SketchMode