JDK-4043157 : RFE: generic PropertyEditor for Enumeration properties
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.beans
  • Affected Version: 1.1
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1997-04-04
  • Updated: 2008-04-16
Related Reports
Relates :  
Description
A number of people have properties where the property value is an int
representing a simply enumerated type.

So they would like some kind of generic property editor that can work
on enumerations.

Unfortunately this is non-trivial, because the current BeanInfo mechanisms
work in terms of property editor classes, not property editor instances.
Given a generic enumerated type, you need some way to tell it what the
tags of the enumeration are....

Needs thought.

KGH 4/4/97

Comments
EVALUATION Library lib/dt.jar contains BeanInfo files for Swing package. It is possible to get enumeration values from property descriptor only if this library added to classpath.
10-01-2007

EVALUATION The @beaninfo javadoc architecture has an "enum" tag which indicates that the property is an enumeration. When the beaninfo classes are generated (like the Swing BeanInfo classes in dt.jar), the values of this tag is added as an object array to the FeatureDescriptor with the "enumerationValues" key. We have also created an EnumPropertyEditor which understands the values of these tags and display the enumeration as a list of items in a JComboBox. We hope to have a Swing Connection article which documents the @beaninfo tag with the SwingPropertyEditors and demo builder shortly. mark.davidson@Eng 2000-05-01
01-05-2000