1 19 20 package org.netbeans.beaninfo; 21 22 import java.beans.*; 23 import java.util.ResourceBundle ; 24 import org.openide.util.Exceptions; 25 import org.openide.util.NbBundle; 26 27 31 public abstract class IndentEngine { 32 private IndentEngine () {} 33 37 public static class DefaultBeanInfo extends SimpleBeanInfo { 38 39 public BeanDescriptor getBeanDescriptor () { 40 Class c; 41 try { 42 c = Class.forName("org.openide.text.IndentEngine$Default"); } catch (Exception e) { 44 throw new IllegalStateException (); 45 } 46 BeanDescriptor descr = new BeanDescriptor (c); 47 ResourceBundle bundle = NbBundle.getBundle(IndentEngine.class); 48 49 descr.setDisplayName (bundle.getString("LAB_IndentEngineDefault")); 50 descr.setShortDescription (bundle.getString("HINT_IndentEngineDefault")); 51 return descr; 52 } 53 54 public BeanInfo[] getAdditionalBeanInfo () { 55 try { 56 return new BeanInfo[] { Introspector.getBeanInfo (org.openide.text.IndentEngine.class) }; 57 } catch (IntrospectionException ie) { 58 Exceptions.printStackTrace(ie); 59 return null; 60 } 61 } 62 63 } 64 } 65 | Popular Tags |