Listing Five

package mybeans;

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

//
//
// CaseAwareTextDisplayTBeanInfo
//
// This bean info specifies that a text editor should be used for the
// textCase property whichi is implemented as an int. The user must
// type in "As Is", "Upper Case", "Lower Case", or  "First Letter Capitalized"
// to modify the beans textCase proeprty.

public class CaseAwareTextDisplayTBeanInfo extends CaseAwareTextDisplayBeanInfo
{
  protected PropertyDescriptor getTextCasePropertyDescriptor()
  throws IntrospectionException, ClassNotFoundException {
    PropertyDescriptor pd = super.getTextCasePropertyDescriptor();
    pd.setPropertyEditorClass(Class.forName("mybeans.TextCaseTextPropertyEditor"));
    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 "Jupiter.gif";
  }
}

