Browse files

Uses RendererModel to get all GeneratorParameters

If a generator serve as a base class for other generators
the only instance that can be set is the one that was registered last, this commit fixes that by always look up the parameter from the model and thus will get the one that is in the model's registry.
  • Loading branch information...
1 parent 1f729ca commit 0e28dd3d697a259a68041430458f3c282677eee7 Arvid Berg committed with egonw Jun 28, 2010
View
2 src/main/org/openscience/cdk/renderer/generators/AtomMassGenerator.java
@@ -51,7 +51,7 @@ public IRenderingElement generateElements(
atom.getImplicitHydrogenCount(),
alignment,
atom.getMassNumber(),
- super.getAtomColor(atom));
+ super.getAtomColor(atom, model));
}
public boolean showCarbon(
View
2 src/main/org/openscience/cdk/renderer/generators/ExtendedAtomGenerator.java
@@ -85,7 +85,7 @@ public IRenderingElement generate(
text = atom.getSymbol();
}
Point2d p = atom.getPoint2d();
- Color c = getAtomColor(atom);
+ Color c = getAtomColor(atom,model);
TextGroupElement textGroup = new TextGroupElement(p.x, p.y, text, c);
decorate(textGroup, ac, atom, model);
return textGroup;

0 comments on commit 0e28dd3

Please sign in to comment.