1 32 33 package com.nqadmin.swingSet.datasources; 34 35 import java.beans.*; 36 import java.beans.PropertyDescriptor ; 37 import java.beans.IntrospectionException ; 38 39 49 public class SSJdbcRowSetImplBeanInfo extends SimpleBeanInfo { 50 51 58 public java.awt.Image getIcon(int _iconKind) { 59 60 if (_iconKind == BeanInfo.ICON_MONO_16x16 || 61 _iconKind == BeanInfo.ICON_COLOR_16x16 ) 62 { 63 java.awt.Image img = loadImage("/images/icons/ssrowset.gif"); 64 return img; 65 } 66 if (_iconKind == BeanInfo.ICON_MONO_32x32 || 67 _iconKind == BeanInfo.ICON_COLOR_32x32 ) 68 { 69 java.awt.Image img = loadImage("/images/icons/ssrowset32.gif"); 70 return img; 71 } 72 73 return null; 74 75 } 77 78 public PropertyDescriptor [] getPropertyDescriptors(){ 79 try{ 80 PropertyDescriptor connDescriptor = new PropertyDescriptor ("sSConnection", SSJdbcRowSetImpl.class, "getSSConnection", "setSSConnection"); 81 connDescriptor.setBound(true); 82 connDescriptor.setPropertyEditorClass(SSConnectionEditor.class); 83 PropertyDescriptor queryDescriptor = new PropertyDescriptor ("query", SSJdbcRowSetImpl.class, "getCommand", "setCommand"); 84 queryDescriptor.setBound(true); 85 return new PropertyDescriptor []{connDescriptor, queryDescriptor}; 86 }catch(IntrospectionException ie){ 87 ie.printStackTrace(); 88 } 89 return null; 90 } 91 92 } 93 94 109 | Popular Tags |