?? jpopupbuttonbeaninfo.java
字號:
package com.sunking.swing;import java.beans.*;/** * <p>Title: OpenSwing</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2004</p> * <p>Company: </p> * @author <a href="mailto:sunkingxie@hotmail.com">SunKing</a> * @version 1.0 */public class JPopupButtonBeanInfo extends SimpleBeanInfo { Class beanClass = JPopupButton.class; String iconColor16x16Filename = "JPopupButtonColor16.gif"; String iconColor32x32Filename = "JPopupButtonColor32.gif"; String iconMono16x16Filename = "JPopupButtonColor16.gif"; String iconMono32x32Filename = "JPopupButtonColor32.gif"; public JPopupButtonBeanInfo() { } public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor _actionSameAsPopup = new PropertyDescriptor("actionSameAsPopup", beanClass, "getActionSameAsPopup", "setActionSameAsPopup"); PropertyDescriptor _enabled = new PropertyDescriptor("enabled", beanClass, null, "setEnabled"); PropertyDescriptor _icon = new PropertyDescriptor("icon", beanClass, "getIcon", "setIcon"); PropertyDescriptor _popup = new PropertyDescriptor("popup", beanClass, "getPopup", "setPopup"); PropertyDescriptor _style = new PropertyDescriptor("style", beanClass, "getStyle", "setStyle"); PropertyDescriptor _text = new PropertyDescriptor("text", beanClass, "getText", "setText"); PropertyDescriptor[] pds = new PropertyDescriptor[] { _actionSameAsPopup, _enabled, _icon, _popup, _style, _text}; return pds; } catch(IntrospectionException ex) { ex.printStackTrace(); return null; } } public java.awt.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; } public BeanInfo[] getAdditionalBeanInfo() { Class superclass = beanClass.getSuperclass(); try { BeanInfo superBeanInfo = Introspector.getBeanInfo(superclass); return new BeanInfo[] { superBeanInfo }; } catch(IntrospectionException ex) { ex.printStackTrace(); return null; } }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -