|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<CPKColorEnum> org.proteinshader.structure.enums.CPKColorEnum
public enum CPKColorEnum
Provides an enumeration of the CPK color scheme that is needed by
AtomEnum. The CPK color scheme was developed by Corey, Pauling, and
Koltun for use by chemists and molecular biologists for coloring atoms
in molecular models.
The CPK values used here were taken from a web page on the RasMol
Reference Manual:
http://www.umass.edu/microbio/chime/pe/shared/cpk-rgb.htm
The RGB values are shown below on a 0 to 255 scale, but they are
converted to floats on a scale from 0.0 to 1.0 by the private
constructor for CPKColorEnum.
Enum Constant Summary | |
---|---|
BLUE
RGB = ( 0, 0, 255) for sodium |
|
BROWN
RGB = (165, 42, 42) for zinc, copper, nickel, and bromine |
|
DARK_GRAY
RGB = (128, 128, 144) for calcium, magnesium, aluminium, titanium, chromium, and silver |
|
DEEP_PINK
RGB = (255, 20, 147) for unknown (or not otherwise specified) |
|
FIREBRICK
RGB = (178, 34, 34) for lithium |
|
FOREST_GREEN
RGB = ( 34, 139, 34) for magnesium |
|
GOLDENROD
RGB = (218, 165, 32) for fluorine, silicon, gold |
|
GREEN
RGB = ( 0, 255, 0) for chlorine and boron |
|
LIGHT_BLUE
RGB = (143, 143, 255) for nitrogen |
|
LIGHT_GRAY
RGB = (200, 200, 200) for carbon |
|
ORANGE
RGB = (255, 165, 0) for phosphorus, iron, and barium |
|
PINK
RGB = (255, 192, 203) for helium |
|
PURPLE
RGB = (160, 32, 240) for iodine |
|
RED
RGB = (240, 0, 0) for oxygen |
|
SULPHUR_YELLOW
RGB = (255, 200, 50) for sulphur |
|
WHITE
RGB = (255, 255, 255) for hydrogen |
Method Summary | |
---|---|
float |
getBlue()
Returns the blue component of the RGBA color as a float in the range from 0.0 to 1.0, inclusive. |
float |
getGreen()
Returns the green component of the RGBA color as a float in the range from 0.0 to 1.0, inclusive. |
float |
getRed()
Returns the red component of the RGBA color as a float in the range from 0.0 to 1.0, inclusive. |
static CPKColorEnum |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static CPKColorEnum[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final CPKColorEnum LIGHT_GRAY
public static final CPKColorEnum RED
public static final CPKColorEnum WHITE
public static final CPKColorEnum LIGHT_BLUE
public static final CPKColorEnum SULPHUR_YELLOW
public static final CPKColorEnum GREEN
public static final CPKColorEnum ORANGE
public static final CPKColorEnum BLUE
public static final CPKColorEnum FOREST_GREEN
public static final CPKColorEnum BROWN
public static final CPKColorEnum DARK_GRAY
public static final CPKColorEnum GOLDENROD
public static final CPKColorEnum PURPLE
public static final CPKColorEnum FIREBRICK
public static final CPKColorEnum PINK
public static final CPKColorEnum DEEP_PINK
Method Detail |
---|
public static final CPKColorEnum[] values()
for(CPKColorEnum c : CPKColorEnum.values()) System.out.println(c);
public static CPKColorEnum valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified namepublic float getRed()
public float getGreen()
public float getBlue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |