1 7 package org.ejtools.jndi.browser.model; 8 9 import java.awt.Component ; 10 import java.beans.Customizer ; 11 import java.beans.beancontext.BeanContextChildComponentProxy ; 12 import java.util.Iterator ; 13 14 import org.ejtools.adwt.GenericCustomizer; 15 import org.ejtools.beans.Sort; 16 import org.ejtools.beans.beancontext.CustomBeanContextServicesSupport; 17 18 32 public class JNDIContext extends CustomBeanContextServicesSupport implements BeanContextChildComponentProxy 33 { 34 35 protected transient Customizer c = null; 36 37 protected String className = ""; 38 39 protected String name = ""; 40 41 42 43 public JNDIContext() 44 { 45 super(); 46 } 47 48 49 54 public String getClassName() 55 { 56 return this.className; 57 } 58 59 60 65 public Component getComponent() 66 { 67 if (c == null) 69 { 70 c = new GenericCustomizer(true, this); 71 } 72 return (Component ) c; 73 } 74 75 76 81 public String getName() 82 { 83 return this.name; 84 } 85 86 87 92 public Iterator iterator() 93 { 94 return Sort.sortByName(super.iterator()); 95 } 96 97 98 103 public String toString() 104 { 105 return name == null ? "Undefined" : name; 106 } 107 108 109 114 protected void setClassName(String className) 115 { 116 this.className = className; 117 } 118 119 120 125 protected void setName(String name) 126 { 127 String old = this.name; 128 this.name = name; 129 this.firePropertyChange("name", old, this.name); 130 } 131 } 132 | Popular Tags |