Package org.openscience.cdk.renderer.elements

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


    double d = model.getBondLength() / model.getScale();
    Rectangle2D totalBounds = Renderer.calculateBounds(reaction);
        if (totalBounds == null) return null;
       
        ElementGroup diagram = new ElementGroup();
        diagram.add(new RectangleElement(totalBounds.getMinX()-d,
                                    totalBounds.getMaxY()+d,
                                    totalBounds.getMaxX()+d,
                                    totalBounds.getMinY()-d,
                                    model.getForeColor()));
        if (reaction.getID() != null) {
View Full Code Here


*/
public class AtomContainerBoundsGenerator implements IGenerator<IAtomContainer> {

    public IRenderingElement generate( IAtomContainer ac, RendererModel model) {
        double[] minMax = GeometryTools.getMinMax(ac);
        return new RectangleElement(minMax[0], minMax[3], minMax[2], minMax[1],
                new Color(.7f, .7f, 1.0f));
       
    }
View Full Code Here

        return elementGroup;
    }
   
    public IRenderingElement generate(IAtomContainer molecule, JChemPaintRendererModel model) {
        Rectangle2D bounds = Renderer.calculateBounds(molecule);
        return new RectangleElement(bounds.getMinX(),
                bounds.getMaxY(),
                bounds.getMaxX(),
                bounds.getMinY(),
                model.getBoundsColor());
    }
View Full Code Here

   
    public IRenderingElement generate(
            IAtomContainerSet moleculeSet, JChemPaintRendererModel model) {
        Rectangle2D totalBounds = Renderer.calculateBounds(moleculeSet);
       
        return new RectangleElement(totalBounds.getMinX(),
                                    totalBounds.getMaxY(),
                                    totalBounds.getMaxX(),
                                    totalBounds.getMinY(),
                                    model.getBoundsColor());
    }
View Full Code Here

            }
        }
        if (totalBounds == null) return null;
       
        ElementGroup diagram = new ElementGroup();
        diagram.add(new RectangleElement(totalBounds.getMinX()-DISTANCE,
                                    totalBounds.getMaxY()+DISTANCE,
                                    totalBounds.getMaxX()+DISTANCE,
                                    totalBounds.getMinY()-DISTANCE,
                                    model.getForeColor()));
        diagram.add(new TextElement((totalBounds.getMinX()+totalBounds.getMaxX())/2, totalBounds.getMinY()-DISTANCE, "Products", model.getForeColor()));
View Full Code Here

        double minX = totalBounds.getMinX();
        double minY = totalBounds.getMinY();
        double maxX = totalBounds.getMaxX();
        double maxY = totalBounds.getMaxY();
        Color c = model.getForeColor();
        diagram.add(new RectangleElement(
                        minX - d, maxY + d, maxX + d, minY - d, c));
        diagram.add(new TextElement(
                        (minX+maxX)/2, minY-d, "Reactants", c));
        return diagram;
  }
View Full Code Here

    public RectangleSelection() {
        this.rectangle = new Rectangle2D.Double();
    }
   
    public IRenderingElement generate(Color color) {
        return new RectangleElement(
                this.rectangle.getMinX(),
                this.rectangle.getMaxY(),
                this.rectangle.getMaxX(),
                this.rectangle.getMinY(),
                color);
View Full Code Here

TOP

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

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.