Class pmr.cml.MOLNode
All Packages Class Hierarchy This Package Previous Next Index
Class pmr.cml.MOLNode
java.lang.Object
|
+----pmr.sgml.SGMLNode
|
+----pmr.sgml.DrawableSGMLNode
|
+----pmr.cml.DrawableX_Node
|
+----pmr.cml.MOLNode
- public class MOLNode
- extends DrawableX_Node
- implements SubAddressable
The molecule class.
- Author:
- (C) P. Murray-Rust, 1996
-
MOLNode(String, SGMLTree)
- normal constructor
-
action(Event, Object)
- Reset button has to reset transformation matrix (rotMat) as well
as scaling the scaler2d
-
addMolecularObject(MolecularObject, String)
- add a MolecularObject (usually called from constructor of MolecularObject)
-
addSubAddress(IntRange)
-
-
addSubAddresses(IntRangeVector)
-
-
clearSubAddresses()
-
-
debug()
- for debug
-
display()
- Kicks off a ScrollableTopLevel which contains the object.
-
display(Graphics)
- called from the display() routine of DrawableX_Node
-
drawBond(Graphics, int, int, int, int, int, double, double)
-
-
drawIcon(Graphics, int, int)
- draw Icon
-
drawTruncated(Graphics, int, int, int, int, double, double)
-
-
get2DMolecule()
- probably obsolete - just calculates mol2d
-
getAtomCount()
- common get routines
-
getBondAtom(Choice2)
- get array of all first atoms in bond or all second atoms
-
getBondCount()
-
-
getBondOrderCount(int)
- return the number of bonds with a given (integer) order.
-
getBonds()
- get serial numbers of bonded atoms, 2 per bond
-
getDoubleBondEquivalentCount()
- get double bond equivalent count
-
getELSYM()
- get the ATOMS Object
public ATOMSNode getATOMS() {
if (!processed) {process();}
return cat;
}
/** get element symbols as array
-
getHydrogenCount()
- get the hydrogen count as best as possible
-
getMolecularWeight()
- gets molecular weight
-
getORDER()
- get bond orders
-
getRingCount()
- get ring count
-
getSimpleSMILES()
- gets (unnormalised) SMILES; not yet working
-
getSTER()
- get bond stereochemistries
-
getSubAddresses()
-
-
getXYZ3()
- get the coordinates as a Point3Vector; this is a REFERENCE, so will
change if 'this' changes its coordinates
-
highlight(IntSet)
- general highlighting routine (for any node) assumes it is the ATOMS.
-
highlightAtom(int)
-
-
highlightAtoms(IntSet)
- highlight atoms
-
highlightSubAddresses(boolean)
-
-
mayContain(SGMLNode)
- can this node contain others.
-
mouseDown(Event, int, int)
- action when mouse is clicked; if not overridden, no action
-
mouseDrag(Event, int, int)
- action when mouse is dragged; if not overridden, no action
-
mouseUp(Event, int, int)
- action when mouse is unclicked; if not overridden, no action
-
process()
- complex objects may require processing; override this.
-
setMolecularObjectSelection(String, boolean)
- select/unselect molecular object
-
showHelp()
- display Help (includes ATOMS and BONDS)
MOLNode
public MOLNode(String giName,
SGMLTree tree)
- normal constructor
showHelp
public void showHelp()
- display Help (includes ATOMS and BONDS)
- Overrides:
- showHelp in class DrawableX_Node
getBondOrderCount
public int getBondOrderCount(int order)
- return the number of bonds with a given (integer) order. You cannot
rely on anything other than 1, 2, or 3 at this stage
getRingCount
public int getRingCount()
- get ring count
getDoubleBondEquivalentCount
public int getDoubleBondEquivalentCount()
- get double bond equivalent count
getHydrogenCount
public int getHydrogenCount()
- get the hydrogen count as best as possible
getMolecularWeight
public double getMolecularWeight()
- gets molecular weight
getSimpleSMILES
public SimpleSMILES getSimpleSMILES()
- gets (unnormalised) SMILES; not yet working
get2DMolecule
public void get2DMolecule()
- probably obsolete - just calculates mol2d
drawBond
public void drawBond(Graphics g,
int x0,
int y0,
int x1,
int y1,
int order,
double f0,
double f1)
drawTruncated
public void drawTruncated(Graphics g,
int x0,
int y0,
int x1,
int y1,
double f0,
double f1)
mayContain
public boolean mayContain(SGMLNode n)
- can this node contain others.
- Overrides:
- mayContain in class DrawableX_Node
process
public void process()
- complex objects may require processing; override this.
- Overrides:
- process in class DrawableSGMLNode
getAtomCount
public int getAtomCount()
- common get routines
getBondCount
public int getBondCount()
getXYZ3
public Point3Vector getXYZ3()
- get the coordinates as a Point3Vector; this is a REFERENCE, so will
change if 'this' changes its coordinates
getELSYM
public String[] getELSYM()
- get the ATOMS Object
public ATOMSNode getATOMS() {
if (!processed) {process();}
return cat;
}
/** get element symbols as array
getORDER
public int[] getORDER()
- get bond orders
getSTER
public int[] getSTER()
- get bond stereochemistries
getBonds
public Int2Vector getBonds()
- get serial numbers of bonded atoms, 2 per bond
getBondAtom
public IntArray getBondAtom(Choice2 c)
- get array of all first atoms in bond or all second atoms
addMolecularObject
public void addMolecularObject(MolecularObject mo,
String name)
- add a MolecularObject (usually called from constructor of MolecularObject)
setMolecularObjectSelection
public void setMolecularObjectSelection(String name,
boolean selected)
- select/unselect molecular object
display
public void display()
- Kicks off a ScrollableTopLevel which contains the object.
- Overrides:
- display in class DrawableSGMLNode
display
public void display(Graphics g)
- called from the display() routine of DrawableX_Node
- Overrides:
- display in class DrawableX_Node
drawIcon
public int drawIcon(Graphics g,
int x,
int y)
- draw Icon
- Overrides:
- drawIcon in class DrawableX_Node
highlightAtoms
public void highlightAtoms(IntSet is)
- highlight atoms
highlight
public void highlight(IntSet is)
- general highlighting routine (for any node) assumes it is the ATOMS.
(for bonds you have to use BONDS)
- Overrides:
- highlight in class DrawableX_Node
highlightAtom
public void highlightAtom(int jatom)
action
public boolean action(Event e,
Object arg)
- Reset button has to reset transformation matrix (rotMat) as well
as scaling the scaler2d
- Overrides:
- action in class DrawableX_Node
mouseUp
public boolean mouseUp(Event evt,
int x,
int y)
- action when mouse is unclicked; if not overridden, no action
- Overrides:
- mouseUp in class DrawableX_Node
mouseDown
public boolean mouseDown(Event evt,
int x,
int y)
- action when mouse is clicked; if not overridden, no action
- Overrides:
- mouseDown in class DrawableX_Node
mouseDrag
public boolean mouseDrag(Event evt,
int x,
int y)
- action when mouse is dragged; if not overridden, no action
- Overrides:
- mouseDrag in class DrawableX_Node
clearSubAddresses
public void clearSubAddresses()
addSubAddress
public void addSubAddress(IntRange ir)
addSubAddresses
public void addSubAddresses(IntRangeVector irv)
getSubAddresses
public IntRangeVector getSubAddresses()
highlightSubAddresses
public void highlightSubAddresses(boolean onOff)
debug
public void debug()
- for debug
- Overrides:
- debug in class DrawableX_Node
All Packages Class Hierarchy This Package Previous Next Index