@TestClass(value="org.openscience.cdk.renderer.color.CDK2DAtomColorsTest") public class CDK2DAtomColors extends Object implements IAtomColorer, Serializable
IAtomColorer colorer = new CDK2DAtomColors().set("H", Color.LIGHT_GRAY)
.set("O", Color.RED.lighter());
Constructor and Description |
---|
CDK2DAtomColors() |
Modifier and Type | Method and Description |
---|---|
Color |
getAtomColor(IAtom atom)
Returns the CDK 2D color for the given atom's element.
|
Color |
getAtomColor(IAtom atom,
Color defaultColor)
Returns the CDK 2D color for the given atom's element, or defaults to the given color if no
color is defined.
|
@TestMethod(value="testGetAtomColor") public Color getAtomColor(IAtom atom)
getAtomColor
in interface IAtomColorer
atom
- IAtom to get a color for@TestMethod(value="testGetDefaultAtomColor") public Color getAtomColor(IAtom atom, Color defaultColor)
getAtomColor
in interface IAtomColorer
atom
- IAtom to get a color fordefaultColor
- Color returned if this scheme does not define a color for the passed
IAtomCopyright © 2014. All Rights Reserved.