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

📄 chartbean2beaninfo.java

📁 java2核心技术(原书第七版)卷二:基础知识的配套源码
💻 JAVA
字号:
/**
   @version 1.20 2004-08-30
   @author Cay Horstmann
*/

package com.horstmann.corejava;

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

/**
   The bean info for the chart bean, specifying the 
   icons and the customizer.
*/
public class ChartBean2BeanInfo extends SimpleBeanInfo
{  
   public BeanDescriptor getBeanDescriptor()
   {  
      return new BeanDescriptor(ChartBean2.class, ChartBean2Customizer.class);
   }

   public Image getIcon(int iconType)
   {  
      String name = "";
      if (iconType == BeanInfo.ICON_COLOR_16x16) name = "COLOR_16x16";
      else if (iconType == BeanInfo.ICON_COLOR_32x32) name = "COLOR_32x32";
      else if (iconType == BeanInfo.ICON_MONO_16x16) name = "MONO_16x16";
      else if (iconType == BeanInfo.ICON_MONO_32x32) name = "MONO_32x32";
      else return null;
      return loadImage("ChartBean2_" + name + ".gif");
   }
}

⌨️ 快捷键说明

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