|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchemaxon.struc.MObject
chemaxon.struc.graphics.MPolyline
chemaxon.struc.graphics.MEFlow
public class MEFlow
Electron flow arrow.
Representing the movement of one or two electrons in a reaction as a curved
arrow.
Electron flow can start from any atom or bond, but not from any atom pairs
that has no connection bond.
The logic of the electron flows:
Field Summary | |
---|---|
static int |
E_SINK
Electron sink. |
static int |
E_SOURCE
Electron source. |
Fields inherited from class chemaxon.struc.graphics.MPolyline |
---|
ARROW_BACK_FLAG, ARROW_CROSSED_FLAG, ARROW_CURVED_FLAG, ARROW_DASHED_FLAG, ARROW_EQUILIBRIUM_FLAG, ARROW_GROUP1_MASK, ARROW_GROUP2_MASK, ARROW_HALF_LEFT, ARROW_HALF_MASK, ARROW_HALF_RIGHT, ARROW_RETROSYNTHETIC_FLAG, arrowFlags, CLOSED_FLAG, DEFAULT_ARROW_HEAD_LENGTH, DEFAULT_ARROW_HEAD_WIDTH, DEFAULT_THICKNESS, HEAD, points, TAIL, THICKNESS_SET_FLAG |
Fields inherited from class chemaxon.struc.MObject |
---|
PAINT_ANTIALIAS, PAINT_FOCUSED, TRANSFORM_DISTORT |
Constructor Summary | |
---|---|
|
MEFlow()
Contructs an empty electron flow arrow. |
|
MEFlow(int ne)
Contructs an empty electron flow arrow. |
protected |
MEFlow(MEFlow l)
Copy constructor. |
|
MEFlow(MPoint p1,
MPoint p2,
int ne)
Contructs an electron flow arrow with the specified endpoints. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates a clone. |
static MolAtom |
getAtom(java.lang.Object terminus)
Gets the atom at the terminus of an arrow. |
static MolAtom[] |
getAtoms(java.lang.Object terminus)
Gets the atom or atoms at the terminus of an arrow. |
static MolBond |
getBond(java.lang.Object terminus)
Gets the bond at the terminus of an arrow. |
java.lang.Object |
getMolObject(int i)
Gets the electron source or sink. |
int |
getNumElectrons()
Gets the number of electrons the arrow represents. |
MPoint |
getPoint(int i)
Gets a point of the line. |
int |
getPointRefCount()
Gets the number of point references. |
java.lang.Object |
getSink()
Gets the destination of the electron-flow arrow (MolAtom, MolBond, or MolAtom[2] for incipient bond). |
MolAtom |
getSinkAtom()
Gets the atom at the sink of this arrow. |
MolAtom[] |
getSinkAtoms()
Gets the atom or atoms at the arrow sink. |
MolBond |
getSinkBond()
Gets the bond at the sink of this arrow. |
java.lang.Object |
getSource()
Gets the origin of the electron-flow arrow (MolAtom or MolBond). |
MolAtom |
getSourceAtom()
Gets the atom at the source of this arrow. |
MolAtom[] |
getSourceAtoms()
Gets the atom or atoms at the arrow source. |
MolBond |
getSourceBond()
Gets the bond at the source of this arrow. |
static MolAtom[][] |
getValidSinkAtomPairsForMolecule(Molecule m,
MolAtom source)
Returns the atom pairs can be chosen as a sink for an electron flow with a MolAtom as a source in the molecule. |
static MolAtom[][] |
getValidSinkAtomPairsForMolecule(Molecule m,
MolBond source)
Returns the atom pairs can be chosen as a sink for an electron flow with a MolBond as a source in the molecule. |
static MolAtom[] |
getValidSinkAtomsForMolecule(Molecule m,
MolAtom source)
Returns the atoms can be chosen as a sink for an electron flow with a MolAtom as a source in the molecule. |
static MolAtom[] |
getValidSinkAtomsForMolecule(Molecule m,
MolBond source)
Returns the atoms can be chosen as a sink for an electron flow with a MolBomd as a source in the molecule. |
static MolBond[] |
getValidSinkBondsForMolecule(Molecule m,
MolAtom source)
Returns the bonds can be chosen as a sink for an electron flow with a MolAtom as a source in the molecule. |
static MolBond[] |
getValidSinkBondsForMolecule(Molecule m,
MolBond source)
Returns the bonds can be chosen as a sink for an electron flow with a MolBond as a source in the molecule. |
static MolAtom[][] |
getValidSourceAtomPairsForMolecule(Molecule m)
Returns the atom pairs can be chosen as incipient bonds as a source for an electron flow in the molecule. |
static MolAtom[] |
getValidSourceAtomsForMolecule(Molecule m)
Returns the atoms can be chosen as a source for an electron flow in the molecule. |
static MolBond[] |
getValidSourceBondsForMolecule(Molecule m)
Returns the bonds can be chosen as a source for an electron flow in the molecule. |
static boolean |
isAtom(java.lang.Object terminus)
Gets whether the arrow's terminus is at an atom. |
static boolean |
isBond(java.lang.Object terminus)
Gets whether the arrow's terminus is at a bond. |
static boolean |
isIncipBond(java.lang.Object sink)
Gets whether the arrow's sink is at an incipient bond. |
static boolean |
isValidSourceAndSinkForMolecule(java.lang.Object source,
java.lang.Object sink,
Molecule m)
Checks if the given Objects can be a source and sink of a electron flow in the molecule. |
static boolean |
isValidSourceForMolecule(java.lang.Object source,
Molecule m)
Checks if the given Object can be a source of a electron flow in the molecule. |
boolean |
sinkIsAtom()
Gets whether this arrow's sink is an atom. |
boolean |
sinkIsBond()
Gets whether this arrow's sink is a bond. |
boolean |
sinkIsIncipBond()
Gets whether this arrow's sink is an incipient bond. |
boolean |
sourceIsAtom()
Gets whether this arrow's source is an atom. |
boolean |
sourceIsBond()
Gets whether this arrow's source is a bond. |
Methods inherited from class chemaxon.struc.graphics.MPolyline |
---|
addAttributeKeys, calcCenter, checkValidity, containsAtom, copyProperties, distanceFrom, finishCloning, fixClonedPoints, fixMidPointClones, getArcAngle, getArcCenter, getArcRadius, getArcRadius, getArrowFlags, getArrowLength, getArrowWidth, getAttribute, getFlags, getMidPointLocation, getMirroredArrowFlags, getPointCount, getPointRef, getPoints, getSkip, getThickness, hasBackground, hasColor, hasFace, hasLineColor, hasOutline, isArrow, isEmpty, isThicknessSet, removeChild, replaceAtom, reverse, rotate, setArcAngle, setArrow, setArrowFlags, setArrowLength, setArrowWidth, setAttribute, setFlags, setPoints, setSkip, setThickness, transform, unselectContents, updateBoundingRect |
Methods inherited from class chemaxon.struc.MObject |
---|
addCdataAttributeKeys, addNotify, containsPoint, distanceFrom, getBackground, getColor, getLineColor, isChildOf, isInternalSelectable, isReactionArrow, isSelectableNow, isSelected, isTransformable, makeColor, removeAtom, removeNotify, setBackground, setColor, setLineColor, setSelected, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int E_SOURCE
getMolObject(int)
,
Constant Field Valuespublic static final int E_SINK
getMolObject(int)
,
Constant Field ValuesConstructor Detail |
---|
public MEFlow()
public MEFlow(int ne)
ne
- one-electron (1) or two-electron (2) transferpublic MEFlow(MPoint p1, MPoint p2, int ne)
p1
- the starting pointp2
- the endpointne
- one-electron (1) or two-electron (2) transferMAtomSetPoint
protected MEFlow(MEFlow l)
l
- the original arrowMethod Detail |
---|
public int getNumElectrons()
public MPoint getPoint(int i)
getPoint
in class MPolyline
i
- the point index
public java.lang.Object clone()
MObject
clone
in class MPolyline
public java.lang.Object getMolObject(int i)
i
- E_SOURCE
or E_SINK
public int getPointRefCount()
getPointRefCount
in class MPolyline
public static MolAtom[] getValidSourceAtomsForMolecule(Molecule m)
m
- the molecule
public static MolAtom[] getValidSinkAtomsForMolecule(Molecule m, MolAtom source)
m
- the moleculesource
- the source of the electron flow in the molecule.
public static MolAtom[] getValidSinkAtomsForMolecule(Molecule m, MolBond source)
m
- the moleculesource
- the source of the electron flow in the molecule.
public static MolBond[] getValidSourceBondsForMolecule(Molecule m)
m
- the molecule
public static MolBond[] getValidSinkBondsForMolecule(Molecule m, MolAtom source)
m
- the moleculesource
- the source of the electron flow in the molecule.
public static MolBond[] getValidSinkBondsForMolecule(Molecule m, MolBond source)
m
- the moleculesource
- the source of the electron flow in the molecule.
public static MolAtom[][] getValidSourceAtomPairsForMolecule(Molecule m)
m
- the molecule
public static MolAtom[][] getValidSinkAtomPairsForMolecule(Molecule m, MolAtom source)
m
- the moleculesource
- the source of the electron flow in the molecule.
public static MolAtom[][] getValidSinkAtomPairsForMolecule(Molecule m, MolBond source)
m
- the moleculesource
- the source of the electron flow in the molecule.
public static boolean isValidSourceForMolecule(java.lang.Object source, Molecule m)
source
- a MolAtom, a MolBond or a MolAtom[] array with length 1 or 2.
If the length is 1 it represents a MolAtom, if 2 it represents
a MolBond or an incipient bond between 2 atoms.m
- the molecule
public static boolean isValidSourceAndSinkForMolecule(java.lang.Object source, java.lang.Object sink, Molecule m)
source
- a MolAtom, a MolBond or a MolAtom[] array with length 1 or 2.
If the length is 1 it represents a MolAtom, if 2 it represents
a MolBond or an incipient bond between 2 atoms.sink
- a MolAtom, a MolBond or a MolAtom[] array with length 1 or 2.
If the length is 1 it represents a MolAtom, if 2 it represents
a MolBond or an incipient bond between 2 atoms.m
- the molecule
public java.lang.Object getSource()
public java.lang.Object getSink()
public boolean sourceIsAtom()
public boolean sinkIsAtom()
public static boolean isAtom(java.lang.Object terminus)
terminus
- the arrow terminus
public boolean sourceIsBond()
public boolean sinkIsBond()
public static boolean isBond(java.lang.Object terminus)
terminus
- the arrow terminus
public boolean sinkIsIncipBond()
public static boolean isIncipBond(java.lang.Object sink)
sink
- the arrow sink
public MolAtom getSourceAtom()
public MolAtom getSinkAtom()
public static MolAtom getAtom(java.lang.Object terminus)
terminus
- the arrow terminus
public static MolBond getBond(java.lang.Object terminus)
terminus
- the arrow terminus
public MolBond getSourceBond()
public MolBond getSinkBond()
public MolAtom[] getSourceAtoms()
public MolAtom[] getSinkAtoms()
public static MolAtom[] getAtoms(java.lang.Object terminus)
terminus
- the arrow terminus
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |