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 color for a certain atom type.
|
Color |
getAtomColor(IAtom atom,
Color defaultColor)
Returns the color for a certain atom type, and uses the
given default color if it fails to identify the atom type.
|
public Color getAtomColor(IAtom atom)
getAtomColor
in interface IAtomColorer
atom
- the atom whose color is desiredpublic Color getAtomColor(IAtom atom, Color defaultColor)
getAtomColor
in interface IAtomColorer
atom
- the atom in questiondefaultColor
- the color to use if the atom type of this atom cannot be identifiedCopyright © 2018. All Rights Reserved.