Class RasmolColors
- java.lang.Object
-
- org.openscience.cdk.renderer.color.RasmolColors
-
- All Implemented Interfaces:
Serializable
,IAtomColorer
public class RasmolColors extends Object implements IAtomColorer, Serializable
Atom coloring following RasMol/Chime Color scheme http://www.umass.edu/microbio/rasmol/rascolor.htm.- See Also:
- Serialized Form
- Source code:
- main
- Belongs to CDK module:
- render
-
-
Constructor Summary
Constructors Constructor Description RasmolColors()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Color
getAtomColor(IAtom atom)
Returns the Rasmol color for the given atom's element.Color
getAtomColor(IAtom atom, Color defaultColor)
Returns the Rasmol color for the given atom's element, or defaults to the given color if no color is defined.
-
-
-
Method Detail
-
getAtomColor
public Color getAtomColor(IAtom atom)
Returns the Rasmol color for the given atom's element.- Specified by:
getAtomColor
in interfaceIAtomColorer
- Parameters:
atom
- IAtom to get a color for- Returns:
- the atom's color according to this coloring scheme.
-
getAtomColor
public Color getAtomColor(IAtom atom, Color defaultColor)
Returns the Rasmol color for the given atom's element, or defaults to the given color if no color is defined.- Specified by:
getAtomColor
in interfaceIAtomColorer
- Parameters:
atom
- IAtom to get a color fordefaultColor
- Color returned if this scheme does not define a color for the passed IAtom- Returns:
- the atom's color according to this coloring scheme.
-
-