public class LonePairGenerator implements IGenerator<IAtomContainer> {
public LonePairGenerator() {}
public IRenderingElement generate(IAtomContainer ac, RendererModel model) {
JChemPaintRendererModel jcpModel = (JChemPaintRendererModel) model;
ElementGroup group = new ElementGroup();
// TODO : put into RendererModel
final double SCREEN_RADIUS = 1.0;
// separation between centers
final double SCREEN_SEPARATION = 2.5;
final Color RADICAL_COLOR = Color.BLACK;
// XXX : is this the best option?
final double ATOM_RADIUS = jcpModel.getAtomRadius();
double scale = jcpModel.getScale();
double modelAtomRadius = ATOM_RADIUS / scale;
double modelPointRadius = SCREEN_RADIUS / scale;
double modelSeparation = SCREEN_SEPARATION / scale;
for (ILonePair lp : ac.lonePairs()) {
IAtom atom = lp.getAtom();