public class EnumType
extends java.lang.Object
implements java.lang.Comparable
EnumType[] values=new EnumType[]{ new EnumType(1, "MALE"), new EnumType(2, "FEMALE") }; EnumTypeManager.getInstance().registerEnumTypes("SEX", values);
Constructor and Description |
---|
EnumType(java.lang.Comparable value)
Creates an enumeration.
|
EnumType(java.lang.Comparable value,
java.lang.String displayName)
Creates an comparable enumeration.
|
EnumType(java.lang.Comparable value,
java.lang.String displayName,
javax.swing.Icon icon)
Creates an comparable enumeration.
|
EnumType(java.lang.Comparable value,
java.lang.String dispalyName,
java.lang.String url)
Creates an comparable enumeration.
|
EnumType(int value,
java.lang.String displayName)
Creates an integer enumeration.
|
EnumType(int value,
java.lang.String displayName,
javax.swing.Icon icon)
Creates an integer enumeration.
|
EnumType(int value,
java.lang.String displayName,
java.lang.String url)
Creates an integer enumeration.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o)
Compares to the enum type's value property.
|
boolean |
equals(java.lang.Object object)
Compares to the enum type's value property.
|
java.awt.Color |
getBackground()
Gets the background for this enum type.
|
java.lang.String |
getDisplayName()
Gets the display name for this enum type.
|
java.awt.Color |
getForeground()
Gets the foreground for this enum type.
|
javax.swing.Icon |
getIcon()
Gets the enumeration icon
|
java.lang.Object |
getValue()
Gets the enumeration value.
|
int |
hashCode() |
void |
setBackground(java.awt.Color background)
Sets the background for this enum type.
|
void |
setForeground(java.awt.Color foreground)
Sets the foreground for this enum type.
|
java.lang.String |
toString()
Returns the display name.
|
public EnumType(java.lang.Comparable value)
value
- Comparable the enumeration value.public EnumType(int value, java.lang.String displayName)
value
- int the enumeration value.displayName
- String display name of this enumerationpublic EnumType(int value, java.lang.String displayName, java.lang.String url)
value
- int the enumeration value.displayName
- String display name of this enumerationurl
- String the enumeration icon url which may be used
as a symbol of this enumeration.public EnumType(int value, java.lang.String displayName, javax.swing.Icon icon)
value
- int the enumeration value.displayName
- String display name of this enumerationicon
- Icon the enumeration icon which may be used
as a symbol of this enumeration.public EnumType(java.lang.Comparable value, java.lang.String displayName)
value
- Comparable the enumeration value.displayName
- String the enumeration display name.public EnumType(java.lang.Comparable value, java.lang.String dispalyName, java.lang.String url)
value
- Comparable the enumeration value.dispalyName
- String the enumeration display name.url
- String the enumeration icon url which may be used
as a symbol of this enumeration.public EnumType(java.lang.Comparable value, java.lang.String displayName, javax.swing.Icon icon)
value
- Comparable the enumeration value.displayName
- String the enumeration display name.icon
- Icon the enumeration icon which may be used
as a symbol of this enumeration.public java.lang.String toString()
toString
in class java.lang.Object
public javax.swing.Icon getIcon()
public java.lang.Object getValue()
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public java.awt.Color getBackground()
public void setBackground(java.awt.Color background)
background
- the background for this enum type.public java.awt.Color getForeground()
public void setForeground(java.awt.Color foreground)
foreground
- the foreground for this enum type.public java.lang.String getDisplayName()
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.