Package org.openscience.cdk.renderer.elements

Examples of org.openscience.cdk.renderer.elements.IRenderingElement


        // calculate the bounds
        Rectangle2D modelBounds = Renderer.calculateBounds(reaction);

        // setup and draw
        this.setupTransformNatural(modelBounds);
        IRenderingElement diagram = this.generateDiagram(reaction);
        this.paint(drawVisitor, diagram);

        return this.convertToDiagramBounds(modelBounds);
    }
View Full Code Here


        this.setupTransformToFit(bounds, modelBounds,
                Renderer.calculateAverageBondLength(chemModel), resetCenter);

        // generate the elements
        IRenderingElement diagram = this.generateDiagram(moleculeSet);

        // paint it
        this.paint(drawVisitor, diagram);
    }
View Full Code Here

        this.setupTransformToFit(bounds, modelBounds,
                Renderer.calculateAverageBondLength(reaction), resetCenter);

        // generate the elements
        IRenderingElement diagram = this.generateDiagram(reaction);

        // paint it
        this.paint(drawVisitor, diagram);
    }
View Full Code Here

            double d = 4 * r;
            IAtomContainer selectedAC = selection.getConnectedAtomContainer();
            if (selectedAC != null) {
                for (IAtom atom : selectedAC.atoms()) {
                    Point2d p = atom.getPoint2d();
                    IRenderingElement element;
                    element = new OvalElement(
                          p.x, p.y, d, false, selectionColor);
                    selectionElements.add(element);
                }
            }
View Full Code Here

        this.setupTransformToFit(bounds, modelBounds,
                                 GeometryTools.getBondLengthAverage(atomContainer), resetCenter);

        // the diagram to draw
        IRenderingElement diagram = this.generateDiagram(atomContainer);

        this.paint(drawVisitor, diagram);
    }
View Full Code Here

  }

  protected IRenderingElement generateDiagram(IAtomContainer ac) {
      ElementGroup diagram = new ElementGroup();
        for (IGenerator generator : this.generators) {
          IRenderingElement element = generator.generate(ac, this.rendererModel);
          if(!(element instanceof TextGroupElement) || ((TextGroupElement)element).children.size()>0)
            diagram.add(element);
        }
        //Rgroup stuff (not contained in the ac)
       
View Full Code Here

        if(hub == null || hub.getPhantoms()==null)
            return new ElementGroup();
        final ElementGroup group = new ElementGroup();
        for(IBond bond:hub.getPhantoms().bonds()) {
            this.setOverrideColor(Color.GRAY);
            IRenderingElement element = generateBond( bond, jcpModel);
            group.add(element);
        }
        return group;
    }
View Full Code Here

TOP

Related Classes of org.openscience.cdk.renderer.elements.IRenderingElement

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.