Package org.openscience.cdk.interfaces

Examples of org.openscience.cdk.interfaces.IChemObject


                                                        chemModelRelay.getRenderer().getRenderer2DModel();
                IAtom atom = chemModelRelay.getClosestAtom(worldCoord);
                IBond bond = chemModelRelay.getClosestBond(worldCoord);

                IChemObjectSelection localSelection = rModel.getSelection();
                IChemObject chemObject = getHighlighted(worldCoord, atom, bond);

                if (localSelection==null || !localSelection.contains(chemObject)) {
                        if (chemObject != null) {
                                localSelection = new SingleSelection<IChemObject>(chemObject);
                        } else {
View Full Code Here


        super(chemModelRelay);
    }

    public void mouseClickedDown(Point2d worldCoord) {
       
        IChemObject singleSelected = getHighlighted( worldCoord,
                                                     chemModelRelay.getClosestAtom(worldCoord) );
        IAtom closestAtom;
        if(singleSelected instanceof IAtom) {
            closestAtom = (IAtom) singleSelected;
        }else {
View Full Code Here

       
        start = new Point2d(worldCoord);
        IAtom closestAtom = chemModelRelay.getClosestAtom(worldCoord);
        IBond closestBond = chemModelRelay.getClosestBond( worldCoord );

        IChemObject singleSelection = getHighlighted( worldCoord,
                                                      closestAtom,
                                                      closestBond );

        if(singleSelection instanceof IAtom ) {
            source =  (IAtom) getHighlighted(worldCoord, closestAtom);
View Full Code Here

    IAtom atom = chemModelRelay.getClosestAtom(worldCoord);
    IBond bond = chemModelRelay.getClosestBond(worldCoord);
    JChemPaintRendererModel model =
        chemModelRelay.getRenderer().getRenderer2DModel();
   
    IChemObject obj = getHighlighted( worldCoord, atom,bond );
    if(obj == null)
        unsetHighlights( model );
    else
        update(obj,model);
  }
View Full Code Here

     * @see org.openscience.cdk.controller.ControllerModuleAdapter#mouseClickedDouble(javax.vecmath.Point2d)
     */
    public void mouseClickedDouble(Point2d p){
        IAtom closestAtom = chemModelRelay.getClosestAtom(p);
        IBond closestBond = chemModelRelay.getClosestBond(p);
        IChemObject singleSelection = getHighlighted( p,
                closestAtom,
                closestBond );
        if(singleSelection!=null){
            for (IAtomContainer isolatedSystem : ConnectivityChecker.partitionIntoMolecules(this.chemModelRelay.getIChemModel().getMoleculeSet().getAtomContainer(0)).atomContainers()) {
                if(isolatedSystem.contains(closestAtom) || isolatedSystem.contains(closestBond)){
View Full Code Here

            bondLength=1.5;
        start = new Point2d(worldCoord);
        IAtom closestAtom = chemModelRelay.getClosestAtom(worldCoord);
        IBond closestBond = chemModelRelay.getClosestBond( worldCoord );

        IChemObject singleSelection = getHighlighted( worldCoord,
                                                      closestAtom,
                                                      closestBond );

        if(singleSelection == null || singleSelection instanceof IAtom ) {
            isBond = false;
View Full Code Here

TOP

Related Classes of org.openscience.cdk.interfaces.IChemObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.