Listing Eight

package mybeans;

import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;

//
//
// CaseAwareTextDisplayLBeanInfo
//
// This bean info specifies that a list editor should be used for the
// textCase property whichi is implemented as an int. The user may only
// select items that appear in the list.

public class CaseAwareTextDisplayLBeanInfo extends CaseAwareTextDisplayBeanInfo
{
  protected PropertyDescriptor getTextCasePropertyDescriptor()
  throws IntrospectionException, ClassNotFoundException {
    PropertyDescriptor pd = super.getTextCasePropertyDescriptor();
    pd.setPropertyEditorClass(Class.forName("mybeans.TextCaseListPropertyEditor"));
    return pd;
  }

  //---------------------------------------------------------------------------
  // Returns the name of the file containing the beans icon. This is
  // implemented as a separate method solely for convenience in subclassing.
  protected String getBeanIconString() {
    return "Venus.gif";
  }
}
