org.proteinshader.gui.enums
Enum OrientationEnum

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

public enum OrientationEnum
extends Enum<OrientationEnum>

Provides a general orientation enumeration.

This enum is used by the Renderer for positioning an image and by the SpringLoadedJFrame for specifying whether it should be attached to its parent frame at the top, bottom, left, or right.


Enum Constant Summary
BACK
          The menu name for this enum is "Back".
BOTTOM
          The menu name for this enum is "Bottom".
FRONT
          The menu name for this enum is "Front".
LEFT
          The menu name for this enum is "Left".
ORIGINAL
          The menu name for this enum is "Original".
RIGHT
          The menu name for this enum is "Right".
TOP
          The menu name for this enum is "Top".
 
Method Summary
 String getMenuName()
          Returns the name of the OrientationEnum in a form suitable for use in a menu.
 String toString()
          Returns the name of the OrientationEnum in a form suitable for use in a menu.
static OrientationEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static OrientationEnum valueOfMenuName(String menuName)
          Returns the OrientationEnum with the same menu name as the String given as an argument.
static OrientationEnum[] 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

ORIGINAL

public static final OrientationEnum ORIGINAL
The menu name for this enum is "Original".


FRONT

public static final OrientationEnum FRONT
The menu name for this enum is "Front".


BACK

public static final OrientationEnum BACK
The menu name for this enum is "Back".


LEFT

public static final OrientationEnum LEFT
The menu name for this enum is "Left".


RIGHT

public static final OrientationEnum RIGHT
The menu name for this enum is "Right".


TOP

public static final OrientationEnum TOP
The menu name for this enum is "Top".


BOTTOM

public static final OrientationEnum BOTTOM
The menu name for this enum is "Bottom".

Method Detail

values

public static final OrientationEnum[] 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(OrientationEnum c : OrientationEnum.values())
        System.out.println(c);

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

valueOf

public static OrientationEnum 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

getMenuName

public String getMenuName()
Returns the name of the OrientationEnum in a form suitable for use in a menu.

Returns:
The OrientationEnum as a String.

toString

public String toString()
Returns the name of the OrientationEnum in a form suitable for use in a menu.

Overrides:
toString in class Enum<OrientationEnum>
Returns:
The OrientationEnum as a String.

valueOfMenuName

public static OrientationEnum valueOfMenuName(String menuName)
Returns the OrientationEnum with the same menu name as the String given as an argument.

Returns:
The OrientationEnum matching the menu name.
Throws:
IllegalArgumentException - if the menu name does not match an OrientationEnum.


Copyright © 2007-2008