|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.binding.metadata.MetaData
org.jdesktop.binding.metadata.EnumeratedMetaData
public class EnumeratedMetaData
Class for representing meta-data for data fields which have a finite
set of possible values. The type of each value in the enumeration must
match the type ("elementClass" property) of the meta-data object.
Example usage:
String weekdays[] = {"Sunday","Monday","Tuesday","Wednesday",
"Thursday","Friday","Saturday"};
EnumeratedMetaData metaData = new EnumeratedMetaData("weekday", String.class,
"Day of Week");
metaData.setEnumeration(weekdays);
Field Summary | |
---|---|
protected java.lang.Object[] |
enumeration
|
Fields inherited from class org.jdesktop.binding.metadata.MetaData |
---|
converter, customProps, decodeFormat, displayWidth, encodeFormat, klass, label, maxValueCount, minValueCount, name, pcs, readOnly, validators |
Constructor Summary | |
---|---|
EnumeratedMetaData()
Instantiates a meta-data object with a default name "enumvalue" and a default field class equal to java.lang.String . |
|
EnumeratedMetaData(java.lang.String name)
Instantiates a meta-data object with the specified name and a default field class equal to java.lang.String . |
|
EnumeratedMetaData(java.lang.String name,
java.lang.Class klass)
Instantiates a meta-data object with the specified name and field class. |
|
EnumeratedMetaData(java.lang.String name,
java.lang.Class klass,
java.lang.String label)
Instantiates a meta-data object with the specified name, field class, and label. |
Method Summary | |
---|---|
java.lang.Object[] |
getEnumeration()
Gets the meta-data "enumeration" property which contains the set of possible values for the associated data field. |
void |
setEnumeration(java.util.List enumeration)
Sets the meta-data "enumeration" property by copying the values contained in the specified list to an internal representation. |
void |
setEnumeration(java.lang.Object[] enumeration)
Sets the meta-data "enumeration" property by copying the values contained in the specified array to an internal representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.Object[] enumeration
Constructor Detail |
---|
public EnumeratedMetaData()
java.lang.String
.
This provides the no-argument constructor required for JavaBeans.
It is recommended that the program explicitly set a meaningful
"name" property.
public EnumeratedMetaData(java.lang.String name)
java.lang.String
.
name
- String containing the name of the data fieldpublic EnumeratedMetaData(java.lang.String name, java.lang.Class klass)
name
- String containing the name of the data fieldklass
- Class indicating type of data fieldpublic EnumeratedMetaData(java.lang.String name, java.lang.Class klass, java.lang.String label)
name
- String containing the name of the data fieldklass
- Class indicating type of data fieldlabel
- String containing the user-displayable label for the
data fieldMethod Detail |
---|
public java.lang.Object[] getEnumeration()
setEnumeration(java.lang.Object[])
public void setEnumeration(java.lang.Object[] enumeration)
enumeration
- array containing 0 or more enumerated values for the data fieldgetEnumeration()
public void setEnumeration(java.util.List enumeration)
enumeration
- list containing 0 or more enumerated values for the data fieldgetEnumeration()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |