📄 cuteshapebeaninfo.java
字号:
package chapter7.customize;
import java.beans.*;
public class CuteShapeBeanInfo extends SimpleBeanInfo {
public PropertyDescriptor[] getPropertyDescriptors() {
try {
PropertyDescriptor pd = new PropertyDescriptor("CuteShape", CuteShape.class);
/*通过pd引用了上一节的CuteShapeEditor类,取得并返回CuteShape属性*/
pd.setPropertyEditorClass(CuteShapeEditor.class);
PropertyDescriptor result[] = {pd};
return result;
}
catch (Exception ex) {
System.err.println("CuteShapeBeanInfo: unexpected exeption: " + ex);
return null;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -