⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 beandemobeaninfo.java~1~

📁 里面所含源码是本人平时做程序的一些实例
💻 JAVA~1~
字号:
package JSwingDemo;

import java.awt.*;
import java.beans.*;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2008</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class BeanDemoBeanInfo extends SimpleBeanInfo {
    Class beanClass = BeanDemo.class;
    String iconColor16x16Filename;
    String iconColor32x32Filename;
    String iconMono16x16Filename;
    String iconMono32x32Filename;

    public BeanDemoBeanInfo() {
    }

    public PropertyDescriptor[] getPropertyDescriptors() {
        try {
            PropertyDescriptor _tel = new PropertyDescriptor(
                    "tel", beanClass, "getTel", "setTel");
            _tel.setDisplayName("Tel");
            _tel.setShortDescription("Tel");
            _tel.setBound(true);

            PropertyDescriptor _userId = new PropertyDescriptor(
                    "userId", beanClass, "getUserId", "setUserId");
            _userId.setDisplayName("userId");
            _userId.setShortDescription("userId");

            PropertyDescriptor[] pds = new PropertyDescriptor[] {
                                       _tel,
                                       _userId
            };
            return pds;
        } catch (Exception exception) {
            exception.printStackTrace();
            return null;
        }
    }

    public Image getIcon(int iconKind) {
        switch (iconKind) {
        case BeanInfo.ICON_COLOR_16x16:
            return ((iconColor16x16Filename != null)
                    ? loadImage(iconColor16x16Filename) : null);

        case BeanInfo.ICON_COLOR_32x32:
            return ((iconColor32x32Filename != null)
                    ? loadImage(iconColor32x32Filename) : null);

        case BeanInfo.ICON_MONO_16x16:
            return ((iconMono16x16Filename != null)
                    ? loadImage(iconMono16x16Filename) : null);

        case BeanInfo.ICON_MONO_32x32:
            return ((iconMono32x32Filename != null)
                    ? loadImage(iconMono32x32Filename) : null);
        }

        return null;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -