public class MEFlow extends MPolyline
Modifier and Type | Field and Description |
---|---|
static int |
E_SINK
Electron sink.
|
static int |
E_SOURCE
Electron source.
|
static String |
lonePairState |
static String |
radicalState |
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_EQUILIBRIUM_HEAD_WIDTH, DEFAULT_MAX_CROSS_SIZE, DEFAULT_RETROSYNTHETIC_HEAD_WIDTH, DEFAULT_THICKNESS, HEAD, points, TAIL, THICKNESS_SET_FLAG
PAINT_ANTIALIAS, PAINT_FOCUSED, TRANSFORM_DISTORT
Modifier | Constructor and Description |
---|---|
|
MEFlow()
Contructs an empty 2 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.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttributeKeys(List<String> v)
Adds the attribute names to the specified vector.
|
MEFlow |
clone()
Creates a clone.
|
void |
copyProperties(MPolyline l)
Copies line properties to another line object.
|
double |
distanceFrom(double x,
double y,
CTransform3D t)
Gets the 2D distance from the specified point.
|
static MolAtom |
getAtom(Object terminus)
Gets the atom at the terminus of an arrow.
|
static MolAtom[] |
getAtoms(Object terminus)
Gets the atom or atoms at the terminus of an arrow.
|
String |
getAttribute(String s)
Gets the value of an attribute.
|
int |
getBaseElectronContainerIndex() |
int |
getBaseElectronIndexInContainer() |
static MolBond |
getBond(Object terminus)
Gets the bond at the terminus of an arrow.
|
static List<MEFlow> |
getEFlowsFromAtom(MolAtom atom)
Returns all the EFlow from this atom.
|
static List<MEFlow> |
getEFlowsOfAtom(MolAtom atom)
Returns all the EFlows that are started from this atom or pointing to this atom.
|
static List<MEFlow> |
getEFlowsToAtom(MolAtom atom)
Returns all the EFlows to this atom.
|
chemaxon.struc.graphics.MElectron |
getMElectron() |
chemaxon.struc.graphics.MElectronContainer |
getMElectronContainer() |
chemaxon.struc.graphics.MElectron |
getMElectronRef() |
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.
|
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.
|
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)
Deprecated.
As of Marvin 6.1, replaced by
EFlowPlacementValidators.getValidSinkAtomPairs(Molecule, MolAtom)
. |
static MolAtom[][] |
getValidSinkAtomPairsForMolecule(Molecule m,
MolBond source)
Deprecated.
As of Marvin 6.1, replaced by
EFlowPlacementValidators.getValidSinkAtomPairs(Molecule, MolBond)
. |
static MolAtom[] |
getValidSinkAtomsForMolecule(Molecule m,
MolAtom source)
Deprecated.
As of Marvin 6.1, replaced by
EFlowPlacementValidators.getValidSinkAtoms(Molecule, MolAtom)
. |
static MolAtom[] |
getValidSinkAtomsForMolecule(Molecule m,
MolBond source)
Deprecated.
As of Marvin 6.1, replaced by
EFlowPlacementValidators.getValidSinkAtoms(Molecule, MolBond)
. |
static MolBond[] |
getValidSinkBondsForMolecule(Molecule m,
MolAtom source)
Deprecated.
As of Marvin 6.1, replaced by
EFlowPlacementValidators.getValidSinkBonds(Molecule, MolAtom)
. |
static MolBond[] |
getValidSinkBondsForMolecule(Molecule m,
MolBond source)
Deprecated.
As of Marvin 6.1, replaced by
EFlowPlacementValidators.getValidSinkBonds(Molecule, MolBond)
. |
static MolAtom[][] |
getValidSourceAtomPairsForMolecule(Molecule m)
Deprecated.
As of Marvin 6.1, replaced by
EFlowPlacementValidators.getValidSourceAtomPairs(Molecule)
. |
static MolAtom[] |
getValidSourceAtomsForMolecule(Molecule m)
Deprecated.
As of Marvin 6.1, replaced by
EFlowPlacementValidators.getValidSourceAtoms(Molecule)
. |
static MolBond[] |
getValidSourceBondsForMolecule(Molecule m)
Deprecated.
As of Marvin 6.1, replaced by
EFlowPlacementValidators.getValidSourceBonds(Molecule)
. |
static boolean |
isAtom(Object terminus)
Gets whether the arrow's terminus is at an atom.
|
static boolean |
isBond(Object terminus)
Gets whether the arrow's terminus is at a bond.
|
static boolean |
isIncipBond(Object sink)
Gets whether the arrow's sink is at an incipient bond.
|
static boolean |
isValidSourceAndSinkForMolecule(Object source,
Object sink,
Molecule m)
Deprecated.
As of Marvin 6.1, replaced by
EFlowPlacementValidators.isValidFlow(MolAtom, MolAtom, Molecule)
or one of the other implementations instead. |
static boolean |
isValidSourceForMolecule(Object source,
Molecule m)
Deprecated.
As of Marvin 6.1, replaced by
EFlowPlacementValidators.isValidSource(MolAtom, Molecule)
or
EFlowPlacementValidators.isValidSource(MolAtom[], Molecule)
or
EFlowPlacementValidators.isValidSource(MolBond, Molecule)
. |
void |
releaseBaseMElectrons() |
void |
removeAtom(MolAtom atom)
Removes the atom from the corresponding molecule object.
|
void |
resetBaseElectronContainer(MolAtom atom,
MDocument doc) |
void |
setAttribute(String s,
String v)
Sets the value of an attribute.
|
void |
setBaseElectronContainer(MolAtom atom,
MDocument doc) |
void |
setBaseElectronContainerIndex(int idx) |
void |
setBaseElectronIndexInContainer(int idx) |
void |
setSkipsToEndPoints() |
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.
|
calcCenter, checkValidity, containsAtom, finishCloning, fixClonedPoints, fixMidPointClones, getArcAngle, getArcCenter, getArcRadius, getArcRadius, getArrowFlags, getArrowLength, getArrowWidth, getFlags, getLineMiddlePoint, getMidPointLocation, getMirroredArrowFlags, getPointCount, getPointRef, getPoints, getSkip, getThickness, hasBackground, hasColor, hasFace, hasLineColor, hasOutline, isArrow, isEmpty, isThicknessSet, removeChild, removeNotify, replaceAtom, reverse, rotate, setArcAngle, setArrow, setArrowFlags, setArrowLength, setArrowWidth, setFlags, setPoints, setSkip, setThickness, transform, unselectContents, updateBoundingRect
addCdataAttributeKeys, addNotify, addNotify, connectToSgroupOfAtom, containsPoint, distanceFrom, getBackground, getColor, getLineColor, isChildOf, isInternalSelectable, isReactionArrow, isSelectableNow, isSelected, isTransformable, makeColor, removeNotify, setBackground, setColor, setLineColor, setSelected, toString
public static final String lonePairState
public static final String radicalState
public static final int E_SOURCE
getMolObject(int)
,
Constant Field Valuespublic static final int E_SINK
getMolObject(int)
,
Constant Field Valuespublic 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 arrowpublic int getNumElectrons()
public MPoint getPoint(int i)
public Object getMolObject(int i)
public int getPointRefCount()
getPointRefCount
in class MPolyline
public Object getSource()
public Object getSink()
public boolean sourceIsAtom()
public boolean sinkIsAtom()
public static boolean isAtom(Object terminus)
terminus
- the arrow terminuspublic boolean sourceIsBond()
public boolean sinkIsBond()
public static boolean isBond(Object terminus)
terminus
- the arrow terminuspublic boolean sinkIsIncipBond()
public static boolean isIncipBond(Object sink)
sink
- the arrow sinkpublic MolAtom getSourceAtom()
public MolAtom getSinkAtom()
public static MolAtom getAtom(Object terminus)
terminus
- the arrow terminuspublic static MolBond getBond(Object terminus)
terminus
- the arrow terminuspublic MolBond getSourceBond()
public MolBond getSinkBond()
public MolAtom[] getSourceAtoms()
public MolAtom[] getSinkAtoms()
public static MolAtom[] getAtoms(Object terminus)
terminus
- the arrow terminuspublic static List<MEFlow> getEFlowsOfAtom(MolAtom atom)
atom
- the sink or source atomList
of EFlows, empty if no EFlow starts from this atom and no EFlow ends to this atom.public static List<MEFlow> getEFlowsFromAtom(MolAtom atom)
getEFlowsOfAtom(MolAtom)
.atom
- List
of MEFlows, empty if no electron flow arrow is connected to the atom.public static List<MEFlow> getEFlowsToAtom(MolAtom atom)
getEFlowsOfAtom(MolAtom)
.atom
- List
of MEFlows, empty if no electron flow arrow is connected to the atom.public void setSkipsToEndPoints()
public int getBaseElectronContainerIndex()
public void setBaseElectronContainerIndex(int idx)
public int getBaseElectronIndexInContainer()
public void setBaseElectronIndexInContainer(int idx)
@Deprecated public static MolAtom[] getValidSourceAtomsForMolecule(Molecule m)
EFlowPlacementValidators.getValidSourceAtoms(Molecule)
.@Deprecated public static MolBond[] getValidSourceBondsForMolecule(Molecule m)
EFlowPlacementValidators.getValidSourceBonds(Molecule)
.@Deprecated public static MolAtom[][] getValidSourceAtomPairsForMolecule(Molecule m)
EFlowPlacementValidators.getValidSourceAtomPairs(Molecule)
.@Deprecated public static MolAtom[] getValidSinkAtomsForMolecule(Molecule m, MolAtom source)
EFlowPlacementValidators.getValidSinkAtoms(Molecule, MolAtom)
.@Deprecated public static MolAtom[] getValidSinkAtomsForMolecule(Molecule m, MolBond source)
EFlowPlacementValidators.getValidSinkAtoms(Molecule, MolBond)
.@Deprecated public static MolBond[] getValidSinkBondsForMolecule(Molecule m, MolAtom source)
EFlowPlacementValidators.getValidSinkBonds(Molecule, MolAtom)
.@Deprecated public static MolBond[] getValidSinkBondsForMolecule(Molecule m, MolBond source)
EFlowPlacementValidators.getValidSinkBonds(Molecule, MolBond)
.@Deprecated public static MolAtom[][] getValidSinkAtomPairsForMolecule(Molecule m, MolAtom source)
EFlowPlacementValidators.getValidSinkAtomPairs(Molecule, MolAtom)
.@Deprecated public static MolAtom[][] getValidSinkAtomPairsForMolecule(Molecule m, MolBond source)
EFlowPlacementValidators.getValidSinkAtomPairs(Molecule, MolBond)
.@Deprecated public static boolean isValidSourceForMolecule(Object source, Molecule m)
EFlowPlacementValidators.isValidSource(MolAtom, Molecule)
or
EFlowPlacementValidators.isValidSource(MolAtom[], Molecule)
or
EFlowPlacementValidators.isValidSource(MolBond, Molecule)
.@Deprecated public static boolean isValidSourceAndSinkForMolecule(Object source, Object sink, Molecule m)
EFlowPlacementValidators.isValidFlow(MolAtom, MolAtom, Molecule)
or one of the other implementations instead.public double distanceFrom(double x, double y, CTransform3D t)
MPolyline
distanceFrom
in class MPolyline
x
- the x coordinatey
- the y coordinatet
- transformation or nullpublic void copyProperties(MPolyline l)
MPolyline
copyProperties
in class MPolyline
l
- the other linepublic String getAttribute(String s)
MPolyline
getAttribute
in class MPolyline
s
- the attribute namepublic void addAttributeKeys(List<String> v)
MPolyline
addAttributeKeys
in class MPolyline
v
- the vectorpublic void setAttribute(String s, String v)
MPolyline
setAttribute
in class MPolyline
s
- the attribute namev
- the attribute valuepublic chemaxon.struc.graphics.MElectron getMElectron()
public chemaxon.struc.graphics.MElectron getMElectronRef()
public chemaxon.struc.graphics.MElectronContainer getMElectronContainer()
public void releaseBaseMElectrons()
public void removeAtom(MolAtom atom)
MObject
removeAtom
in class MObject
atom
- the atom to remove