chemaxon.struc.graphics
Class MAtomSetPoint

java.lang.Object
  extended bychemaxon.struc.MObject
      extended bychemaxon.struc.MPoint
          extended bychemaxon.struc.graphics.MAtomSetPoint
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class MAtomSetPoint
extends MPoint

Point fixed to the location of one or more atoms.

Since:
Marvin 3.5, 07/05/2004
Version:
3.5, 07/06/2004
Author:
Peter Csizmadia
See Also:
Serialized Form

Field Summary
 
Fields inherited from class chemaxon.struc.MObject
PAINT_ANTIALIAS, PAINT_FOCUSED, TRANSFORM_DISTORT
 
Constructor Summary
MAtomSetPoint()
          Contructs an empty point object.
MAtomSetPoint(MAtomSetPoint p)
          Copy constructor.
MAtomSetPoint(MolAtom[] a)
          Contructs a point object.
 
Method Summary
 boolean checkValidity(MDocument doc, java.util.Vector invec)
          Is it a valid object in the document?
 java.lang.Object clone()
          Creates a clone.
 boolean containsAtom(MolAtom a)
          Checks if the atom set contains the specified atom object.
 boolean equals(MAtomSetPoint o)
          Two points equal if their atoms equal.
 boolean equals(MPoint o)
          Two points equal if their atoms equal.
 boolean equals(java.lang.Object o)
          Two points equal if their atoms equal.
 void finishCloning(MDocument olddoc, MDocument newdoc)
          Finish cloning a document.
 MolAtom[] getAtoms()
          Gets the atoms.
 MPoint getPoint(int i)
          Gets the point.
 double getX()
          Gets the x coordinate.
 double getY()
          Gets the y coordinate.
 double getZ()
          Gets the z coordinate.
 boolean isTransformable()
          Is it a transformable object?
 void replaceAtom(MolAtom orig, MolAtom a)
          Replaces a contained atom with another one.
 void setAtoms(MolAtom[] a)
          Sets the atoms.
 void setXYZ(double x, double y, double z)
          Sets the atom coordinates.
 void transform(CTransform3D t, int opts)
          Does not perform any operation.
 
Methods inherited from class chemaxon.struc.MPoint
calcCenter, distanceFrom, getLocation, getPointCount, getPointRef, getPointRefCount, isChildOf, isInternalSelectable, paint
 
Methods inherited from class chemaxon.struc.MObject
addAttributeKeys, addCdataAttributeKeys, addNotify, distanceFrom, getAttribute, getBackground, getColor, getLineColor, hasBackground, hasColor, hasLineColor, isEmpty, isSelectableNow, isSelected, makeColor, makeColorString, removeChild, removeNotify, setAttribute, setBackground, setColor, setLineColor, setSelected, unselectContents
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MAtomSetPoint

public MAtomSetPoint()
Contructs an empty point object.


MAtomSetPoint

public MAtomSetPoint(MolAtom[] a)
Contructs a point object.

Parameters:
a - array of atoms

MAtomSetPoint

public MAtomSetPoint(MAtomSetPoint p)
Copy constructor.

Parameters:
p - the point
Method Detail

equals

public boolean equals(MAtomSetPoint o)
Two points equal if their atoms equal.

Parameters:
o - the other point
Returns:
true if they equal, false otherwise

equals

public boolean equals(MPoint o)
Two points equal if their atoms equal.

Overrides:
equals in class MPoint
Parameters:
o - the other point
Returns:
true if they equal, false otherwise

equals

public boolean equals(java.lang.Object o)
Two points equal if their atoms equal.

Overrides:
equals in class MPoint
Parameters:
o - the other point
Returns:
true if they equal, false otherwise

clone

public java.lang.Object clone()
Description copied from class: MObject
Creates a clone.

Overrides:
clone in class MPoint

setAtoms

public void setAtoms(MolAtom[] a)
Sets the atoms.

Parameters:
a - the atoms

getAtoms

public MolAtom[] getAtoms()
Gets the atoms.

Returns:
the atoms

containsAtom

public boolean containsAtom(MolAtom a)
Checks if the atom set contains the specified atom object.

Overrides:
containsAtom in class MObject
Returns:
true if the atom set contains the specified object, false otherwise
Since:
Marvin 3.5, 07/04/2004

replaceAtom

public void replaceAtom(MolAtom orig,
                        MolAtom a)
Replaces a contained atom with another one.

Overrides:
replaceAtom in class MObject
Parameters:
orig - the original atom
a - the new atom
Since:
Marvin 3.5, 07/04/2004

getX

public double getX()
Gets the x coordinate.

Overrides:
getX in class MPoint
Returns:
the x coordinate

getY

public double getY()
Gets the y coordinate.

Overrides:
getY in class MPoint
Returns:
the y coordinate

getZ

public double getZ()
Gets the z coordinate.

Overrides:
getZ in class MPoint
Returns:
the z coordinate

setXYZ

public void setXYZ(double x,
                   double y,
                   double z)
Sets the atom coordinates.

Overrides:
setXYZ in class MPoint
Parameters:
x - the x coordinate
y - the y coordinate
z - the z coordinate

getPoint

public MPoint getPoint(int i)
Gets the point.

Overrides:
getPoint in class MPoint
Parameters:
i - the point index (must be 0)
Returns:
the point's clone

transform

public void transform(CTransform3D t,
                      int opts)
Does not perform any operation. An atom set point's location is fixed to the atoms.

Overrides:
transform in class MPoint
Parameters:
t - the transformation matrix
opts - transform options or 0

isTransformable

public boolean isTransformable()
Is it a transformable object?

Overrides:
isTransformable in class MObject
Returns:
true if the object can be transformed, false otherwise
Since:
Marvin 3.5, 07/06/2004

checkValidity

public boolean checkValidity(MDocument doc,
                             java.util.Vector invec)
Is it a valid object in the document?

Overrides:
checkValidity in class MObject
Parameters:
doc - the document
invec - vector for invalid atoms or null
Returns:
true if the object is valid, false if it contains an unknown atom
Since:
Marvin 3.5, 07/06/2004

finishCloning

public void finishCloning(MDocument olddoc,
                          MDocument newdoc)
Finish cloning a document. Called by the copy constructor.

Overrides:
finishCloning in class MObject
Since:
Marvin 3.5, 07/02/2004