Enum Class

Enum Class

This Package | All Packages

public class Enum

Represents the base enumerator class. This is used so that the Property Browser recognizes your constants. To create your own enumerator class, list the public static final integers that make up your enumerator. To associate a property with this enumerator, register the property as the enumerator type in your ClassInfo inner class (even though technically the property is of type int). The Property Browser displays a drop-down list with the choices.

The following is sample code:


class Alignment extends Enum {

  public static final int NONE = 0;
  public static final int LEFT = 1;
  public static final int CENTER = 2;
  public static final int RIGHT = 3;
}

foo.setAlignment(Alignment.LEFT);