Package chemaxon.struc.graphics
Class MMoleculeMovie
java.lang.Object
chemaxon.struc.MObject
chemaxon.struc.graphics.MMoleculeMovie
- All Implemented Interfaces:
Serializable
,Cloneable
Molecule animation.
- Since:
- Marvin 4.0, 06/30/2005
- See Also:
-
Field Summary
Fields inherited from class chemaxon.struc.MObject
TRANSFORM_DISTORT
-
Constructor Summary
ModifierConstructorDescriptionprotected
Copy constructor.MMoleculeMovie
(Molecule[] mols) Contructs a molecule animation. -
Method Summary
Modifier and TypeMethodDescriptionvoid
calcCenter
(DPoint3 p, CTransform3D t) Calculates the geometrical center.clone()
Creates a clone.boolean
Checks if the atom set contains the specified atom object.double
distanceFrom
(double x, double y, CTransform3D t) Gets the 2D distance from the specified point.int
Gets the current frame index.Gets the stored molecule graph.getMolecule
(int i) Gets the specified frame.int
Gets the number of frames.Molecule[]
Gets all molecules.getPoint
(int i) Gets a point of the object.int
Gets the number of points (atoms).boolean
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isEmpty()
A chemical structure object is empty if the molecule graph is empty.void
removeAtom
(MolAtom atom) Removes the atom from the corresponding molecule object.void
setCurrentFrameIndex
(int i) Sets the current frame index.void
setSelected
(boolean s) Selects or unselects the object.void
transform
(CTransform3D t, int opts, CTransform3D trot) Transforms all points.void
Unselects atoms.Methods inherited from class chemaxon.struc.MObject
addAttributeKeys, addCdataAttributeKeys, addNotify, checkValidity, connectToSgroupOfAtom, containsPoint, distanceFrom, finishCloning, fixClonedPoints, getAttribute, getBackground, getColor, getContainerMObject, getLineColor, getPointRef, getPointRefCount, hasBackground, hasColor, hasLineColor, isChildOf, isInternalSelectable, isReactionArrow, isSelectableNow, isSelected, isTransformable, makeColor, removeChild, removeNotify, replaceAtom, setAttribute, setBackground, setColor, setLineColor, toString, updateBoundingRect, updateBoundingRect
-
Constructor Details
-
MMoleculeMovie
Contructs a molecule animation.- Parameters:
mols
- the molecules
-
MMoleculeMovie
Copy constructor.- Parameters:
mma
- the original object
-
-
Method Details
-
getMoleculeCount
public int getMoleculeCount()Gets the number of frames.- Returns:
- the number of frames
-
getMolecule
Gets the specified frame.- Returns:
- a molecule
-
getMolecules
Gets all molecules.- Returns:
- molecules
-
getCurrentFrameIndex
public int getCurrentFrameIndex()Gets the current frame index.- Returns:
- the frame index
-
setCurrentFrameIndex
public void setCurrentFrameIndex(int i) Sets the current frame index.- Parameters:
i
- the frame index
-
getCurrentMolecule
Gets the stored molecule graph.- Returns:
- the molecule graph
-
clone
Creates a clone. -
isEmpty
public boolean isEmpty()A chemical structure object is empty if the molecule graph is empty. -
getPointCount
public int getPointCount()Gets the number of points (atoms).- Specified by:
getPointCount
in classMObject
- Returns:
- the number of points
-
getPoint
Gets a point of the object. -
containsAtom
Checks if the atom set contains the specified atom object.- Overrides:
containsAtom
in classMObject
- Returns:
- true if the atom set contains the specified object, false otherwise
-
transform
Transforms all points. -
calcCenter
Calculates the geometrical center.- Specified by:
calcCenter
in classMObject
- Parameters:
p
- store the coordinates heret
- the transformation matrix or null- Since:
- Marvin 4.1, 04/28/2006
-
distanceFrom
Gets the 2D distance from the specified point.- Specified by:
distanceFrom
in classMObject
- Parameters:
x
- the x coordinatey
- the y coordinatet
- transformation or null
-
setSelected
public void setSelected(boolean s) Selects or unselects the object.- Overrides:
setSelected
in classMObject
- Parameters:
s
- use true to select, false to unselect
-
hasSelection
Deprecated, for removal: This API element is subject to removal in a future version.Checks the existence of the selection.- Returns:
- true if selection exists, false otherwise
-
unselectContents
public void unselectContents()Unselects atoms.- Overrides:
unselectContents
in classMObject
-
removeAtom
Description copied from class:MObject
Removes the atom from the corresponding molecule object.- Overrides:
removeAtom
in classMObject
- Parameters:
atom
- the atom to remove
-