1 19 20 25 26 package org.netbeans.modules.j2ee.sun.share.config.ui; 27 28 import java.beans.*; 29 import java.awt.Component ; 30 31 import org.openide.nodes.Node; 32 import org.openide.explorer.propertysheet.PropertySheet; 33 34 import org.netbeans.modules.j2ee.sun.share.config.ConfigBeanStorage; 35 36 41 public class ConfigPropertyEditor extends PropertyEditorSupport { 42 43 private PropertySheet sheet = new PropertySheet(); 44 final Object bean; 45 final Class type; 46 Object value; 47 48 49 public ConfigPropertyEditor(Object bean, Class type) { 50 this.bean = bean; this.type = type; 51 } 53 54 public void setValue(Object value) { 55 this.value = value; 57 Node n = new ConfigBeanNode((ConfigBeanStorage) value); 58 sheet.setNodes(new Node[] { n }); 59 } 60 61 public synchronized Component getCustomEditor() { 62 return sheet; 63 } 64 65 public boolean supportsCustomEditor() { 66 return true; 67 } 68 69 public String getAsText() { 70 return null; 71 } 72 73 } 74 | Popular Tags |