org.proteinshader.structure.enums
Enum RegionEnum

java.lang.Object
  extended by java.lang.Enum<RegionEnum>
      extended by org.proteinshader.structure.enums.RegionEnum
All Implemented Interfaces:
Serializable, Comparable<RegionEnum>

public enum RegionEnum
extends Enum<RegionEnum>

Provides a Region type enumeration (Loop, Helix, or BetaStrand) useful for marking AminoAcids.

This enumeration was added because AminoAcids are marked with a regionID (to note what region of secondary structure they belong to), but there is no guarantee in the PDB specification that a helix ID has to be different than a beta-strand ID. For example, a helix ID might be just the digit "1", and a beta-strand ID might also be just "1". Therefore, marking an AminoAcid with a regionID is not enough. It is also a good idea to mark it with the type of region it belongs to.


Enum Constant Summary
BETA_STRAND
          Beta-strands will be green by default.
HELIX
          Alpha-helices will be goldenrod by default.
LOOP
          Loops will be gray by default.
 
Method Summary
 float getAlpha()
          Returns the alpha component of the RGBA color on a scale from 0.0 to 1.0, inclusive.
 float getBlue()
          Returns the blue component of the RGBA color on a scale from 0.0 to 1.0, inclusive.
 float getGreen()
          Returns the green component of the RGBA color on a scale from 0.0 to 1.0, inclusive.
 String getMenuName()
          Returns the menu name for the Region.
 float getRed()
          Returns the red component of the RGBA color on a scale from 0.0 to 1.0, inclusive.
 String toString()
          Returns the menu name for the Region.
static RegionEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static RegionEnum[] 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, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LOOP

public static final RegionEnum LOOP
Loops will be gray by default.


HELIX

public static final RegionEnum HELIX
Alpha-helices will be goldenrod by default.


BETA_STRAND

public static final RegionEnum BETA_STRAND
Beta-strands will be green by default.

Method Detail

values

public static final RegionEnum[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(RegionEnum c : RegionEnum.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static RegionEnum valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

getRed

public float getRed()
Returns the red component of the RGBA color on a scale from 0.0 to 1.0, inclusive.

Returns:
The red value as a float.

getGreen

public float getGreen()
Returns the green component of the RGBA color on a scale from 0.0 to 1.0, inclusive.

Returns:
The green value as a float.

getBlue

public float getBlue()
Returns the blue component of the RGBA color on a scale from 0.0 to 1.0, inclusive.

Returns:
The blue value as a float.

getAlpha

public float getAlpha()
Returns the alpha component of the RGBA color on a scale from 0.0 to 1.0, inclusive.

Returns:
The alpha value as a float.

getMenuName

public String getMenuName()
Returns the menu name for the Region.

Returns:
A name suitable for use in a menu.

toString

public String toString()
Returns the menu name for the Region.

Overrides:
toString in class Enum<RegionEnum>
Returns:
A name suitable for use in a menu.


Copyright © 2007-2008