1 19 24 25 package org.netbeans.beaninfo.editors; 26 import java.beans.*; 27 import org.openide.explorer.propertysheet.*; 28 36 public abstract class ExPropertyEditorSupport extends PropertyEditorSupport implements ExPropertyEditor { 37 38 39 protected ExPropertyEditorSupport() { 40 } 41 42 47 public final void attachEnv(PropertyEnv env) { 48 attachEnvImpl(env); 49 validateEnv(env); 50 } 51 52 53 protected abstract void attachEnvImpl(PropertyEnv env); 54 55 61 protected abstract void validateEnv(PropertyEnv env); 62 63 66 public static class EnvException extends IllegalArgumentException { 67 public EnvException(String s) { super(s); } 68 } 69 70 72 protected static final String arrToStr(Object [] s) { 73 if (s == null) return "null"; StringBuffer out = new StringBuffer (s.length * 10); 75 for (int i=0; i < s.length; i++) { 76 if (s[i] != null) { 77 out.append(s[i]); 78 } else { 79 out.append("null"); 80 } 81 if (i != s.length-1) { 82 out.append(","); } 84 } 85 return out.toString(); 86 } 87 } 88 | Popular Tags |