1 19 20 package org.netbeans.core.projects; 21 22 import java.awt.Image ; 23 import java.beans.*; 24 import org.netbeans.core.startup.layers.SystemFileSystem; 25 import org.openide.util.Exceptions; 26 27 import org.openide.util.Utilities; 28 29 34 public class SystemFileSystemBeanInfo extends SimpleBeanInfo { 35 36 public BeanDescriptor getBeanDescriptor () { 37 BeanDescriptor descr = new BeanDescriptor (SystemFileSystem.class); 38 descr.setValue ("helpID", SystemFileSystem.class.getName ()); return descr; 40 } 41 42 43 public Image getIcon(int type) { 44 if ((type == java.beans.BeanInfo.ICON_COLOR_16x16) || (type == java.beans.BeanInfo.ICON_MONO_16x16)) 45 return Utilities.loadImage("org/netbeans/core/resources/systemFS.gif"); else 47 return null; 48 } 49 50 public BeanInfo[] getAdditionalBeanInfo () { 51 BeanInfo[] beanInfos = new BeanInfo [1]; 52 beanInfos[0] = new org.netbeans.beaninfo.FileSystemBeanInfo (); 53 return beanInfos; 54 } 55 56 57 60 public PropertyDescriptor[] getPropertyDescriptors () { 61 try { 62 PropertyDescriptor[] desc = new PropertyDescriptor[1]; 63 desc[0] = new PropertyDescriptor ("propagateMasks", SystemFileSystem.class, "getPropagateMasks", null); 64 desc[0].setHidden (true); 65 return desc; 66 } catch (IntrospectionException ie) { 67 Exceptions.printStackTrace(ie); 68 return null; 69 } 70 } 71 } 72 | Popular Tags |