1 19 20 package org.netbeans.beaninfo; 21 22 import java.beans.*; 23 import java.util.ResourceBundle ; 24 import org.openide.util.NbBundle; 25 26 import org.openide.filesystems.*; 27 import org.openide.util.Exceptions; 28 29 33 public class FileSystemBeanInfo extends SimpleBeanInfo { 34 35 38 public PropertyDescriptor[] getPropertyDescriptors () { 39 try { 40 PropertyDescriptor[] desc = new PropertyDescriptor[] { 41 new PropertyDescriptor ("readOnly", FileSystem.class, "isReadOnly", null), new PropertyDescriptor ("valid", FileSystem.class, "isValid", null), new PropertyDescriptor ("hidden", FileSystem.class, "isHidden", "setHidden"), new PropertyDescriptor ("actions", FileSystem.class, "getActions", null), new PropertyDescriptor ("displayName", FileSystem.class, "getDisplayName", null), new PropertyDescriptor ("root", FileSystem.class, "getRoot", null), new PropertyDescriptor ("status", FileSystem.class, "getStatus", null), }; 49 ResourceBundle bundle = NbBundle.getBundle(FileSystemBeanInfo.class); 50 desc[0].setHidden(true); 51 desc[1].setDisplayName (bundle.getString("PROP_valid")); 52 desc[1].setHidden(true); 53 57 desc[2].setHidden(true); 58 desc[3].setHidden (true); 59 desc[4].setHidden (true); 60 desc[5].setHidden (true); 61 desc[6].setHidden (true); 62 return desc; 63 } catch (IntrospectionException ex) { 64 Exceptions.printStackTrace(ex); 65 return super.getPropertyDescriptors(); 66 } 67 } 68 69 } 70 | Popular Tags |