Listing Eleven

package mybeans;

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

//
//
// CaseAwareTextDisplayCBeanInfo
//
// This bean info specifies that a custom property editor should be used for the
// textCase property whichi is implemented as an int. The user makes selections
// via radio-buttons in a dialog.

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