1 19 20 26 27 package org.netbeans.modules.xml.schema.ui.nodes.schema.properties; 28 29 import org.netbeans.modules.xml.schema.model.ReferenceableSchemaComponent; 30 import org.netbeans.modules.xml.schema.model.SchemaComponent; 31 import org.netbeans.modules.xml.schema.ui.basic.editors.GlobalReferenceEditor; 32 import org.netbeans.modules.xml.xam.dom.NamedComponentReference; 33 34 38 public class GlobalReferenceProperty<T extends ReferenceableSchemaComponent> 39 extends BaseSchemaProperty { 40 41 private Class <T> referenceType; 42 private String typeDisplayName; 43 44 57 public GlobalReferenceProperty(SchemaComponent component, 58 String property, String dispName, String desc, 59 String typeDisplayName, String referenceTypeDisplayName, 60 Class <T> referenceType) 61 throws NoSuchMethodException { 62 super(component,NamedComponentReference.class,property,dispName,desc,null); 63 this.referenceType = referenceType; 64 this.typeDisplayName = typeDisplayName; 65 } 66 67 72 @Override 73 public boolean supportsDefaultValue () { 74 return false; 75 } 76 77 81 @Override 82 public java.beans.PropertyEditor getPropertyEditor() { 83 return new GlobalReferenceEditor<T>(super.getComponent(), typeDisplayName, 84 getDisplayName(),referenceType); 85 } 86 87 } 88 | Popular Tags |