//file: DialBeanInfo.java
package magicbeans;
import java.beans.*;
public class DialBeanInfo extends SimpleBeanInfo {
public PropertyDescriptor[] getPropertyDescriptors( ) {
try {
PropertyDescriptor value =
new PropertyDescriptor("value", Dial.class);
PropertyDescriptor minimum =
new PropertyDescriptor("minimum", Dial.class);
PropertyDescriptor maximum =
new PropertyDescriptor("maximum", Dial.class);
value.setBound(true);
minimum.setBound(false);
maximum.setBound(false);
return new PropertyDescriptor [] { value, minimum, maximum };
}
catch (IntrospectionException e) {
return null;
}
}
}
|