Package org.openscience.jchempaint.renderer.elements

Examples of org.openscience.jchempaint.renderer.elements.TextGroupElement


        {
            String text = model.getToolTipText(atom);
            String[] result = text.split("\\n");
            Point2d p = atom.getPoint2d();
            Color c = Color.black;
            TextGroupElement textGroup;
            if(result.length>1){
                textGroup = new TextGroupElement(p.x, p.y, result[1], c, Color.yellow);
                textGroup.addChild(result[0], TextGroupElement.Position.N);
            }else{
                textGroup = new TextGroupElement(p.x, p.y, result[0], c, Color.yellow);
            }
            if(result.length>2)
                textGroup.addChild(result[0], TextGroupElement.Position.S);
            return textGroup;
        }else{
            return null;
        }
    }   
View Full Code Here


            } else {
                text = atom.getSymbol();
            }
            Point2d p = atom.getPoint2d();
            Color c = getAtomColor(atom, model);
            TextGroupElement textGroup = new TextGroupElement(p.x, p.y, text, c);
            if(atom.getFlag(CDKConstants.IS_TYPEABLE)){
                textGroup.isNotTypeableUnderlined = true;
                textGroup.notTypeableUnderlineColor = model.getNotTypeableUnderlineColor();
            }
            decorate(textGroup, ac, atom, model);
View Full Code Here

TOP

Related Classes of org.openscience.jchempaint.renderer.elements.TextGroupElement

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.