1 7 package org.ejtools.adwt.editor; 8 9 10 11 18 public class ClassEditor extends GenericEditor 19 { 20 21 public ClassEditor() 22 { 23 this.value = Class .class; 24 } 25 26 27 32 public String getAsText() 33 { 34 if (this.value != null) 35 { 36 return ((Class ) this.value).getName(); 37 } 38 else 39 { 40 return null; 41 } 42 } 43 44 45 50 public void setAsText(String s) 51 { 52 try 53 { 54 this.value = Thread.currentThread().getContextClassLoader().loadClass(s); 55 } 56 catch (Exception e) 57 { 58 } 59 this.firePropertyChange(); 60 } 61 } 62 63 | Popular Tags |