|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swing.data.MetaData
org.jdesktop.swing.data.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 Object[] |
enumeration
|
| Fields inherited from class org.jdesktop.swing.data.MetaData |
converter, decodeFormat, 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(String name)
Instantiates a meta-data object with the specified name and a default field class equal to java.lang.String. |
|
EnumeratedMetaData(String name,
Class klass)
Instantiates a meta-data object with the specified name and field class. |
|
EnumeratedMetaData(String name,
Class klass,
String label)
Instantiates a meta-data object with the specified name, field class, and label. |
|
| Method Summary | |
Object[] |
getEnumeration()
Gets the meta-data "enumeration" property which contains the set of possible values for the associated data field. |
void |
setEnumeration(List enumeration)
Sets the meta-data "enumeration" property by copying the values contained in the specified list to an internal representation. |
void |
setEnumeration(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 org.jdesktop.swing.data.MetaData |
addPropertyChangeListener, addValidator, getConverter, getDecodeFormat, getElementClass, getEncodeFormat, getLabel, getMaxValueCount, getMinValueCount, getName, getPropertyChangeListeners, getValidators, isReadOnly, isRequired, removePropertyChangeListener, removeValidator, setConverter, setDecodeFormat, setElementClass, setEncodeFormat, setLabel, setMaxValueCount, setMinValueCount, setName, setReadOnly, setRequired |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected 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(String name)
java.lang.String.
name - String containing the name of the data field
public EnumeratedMetaData(String name,
Class klass)
name - String containing the name of the data fieldklass - Class indicating type of data field
public EnumeratedMetaData(String name,
Class klass,
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 field| Method Detail |
public Object[] getEnumeration()
setEnumeration(java.lang.Object[])public void setEnumeration(Object[] enumeration)
enumeration - array containing 0 or more enumerated values for the data fieldgetEnumeration()public void setEnumeration(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 | |||||||||