1 19 20 package org.netbeans.modules.xml.schema.ui.nodes.schema; 21 22 import org.netbeans.modules.xml.schema.model.Notation; 23 import org.netbeans.modules.xml.schema.model.SchemaComponentReference; 24 import org.netbeans.modules.xml.schema.ui.nodes.*; 25 import org.netbeans.modules.xml.schema.ui.nodes.schema.properties.BaseSchemaProperty; 26 import org.netbeans.modules.xml.schema.ui.nodes.schema.properties.NamespaceProperty; 27 import org.openide.nodes.Children; 28 import org.openide.nodes.Sheet; 29 import org.openide.nodes.Node.Property; 30 import org.openide.util.NbBundle; 31 35 public class NotationNode extends SchemaComponentNode<Notation> 36 { 37 41 public NotationNode(SchemaUIContext context, 42 SchemaComponentReference<Notation> reference, 43 Children children) 44 { 45 super(context,reference,children); 46 } 47 48 49 53 @Override 54 public String getTypeDisplayName() 55 { 56 return NbBundle.getMessage(NotationNode.class, 57 "LBL_NotationNode_TypeDisplayName"); } 59 60 64 @Override 65 protected Sheet createSheet() { 66 Sheet sheet = super.createSheet(); 67 Sheet.Set set = sheet.get(Sheet.PROPERTIES); 68 try { 69 Property publicProp = new BaseSchemaProperty( 71 getReference().get(), String .class, "publicIdentifier", NbBundle.getMessage(NotationNode.class,"PROP_PublicIdentifier_DisplayName"), NbBundle.getMessage(NotationNode.class,"PROP_PublicIdentifier_ShortDescription"), null ); 79 set.put(new SchemaModelFlushWrapper(getReference().get(), publicProp)); 80 81 Property systemProp = new NamespaceProperty( 82 getReference().get(), "systemIdentifier", NbBundle.getMessage(NotationNode.class,"PROP_SystemIdentifier_DisplayName"), NbBundle.getMessage(NotationNode.class,"PROP_SystemIdentifier_ShortDescription"), getTypeDisplayName() ); 89 set.put(new SchemaModelFlushWrapper(getReference().get(), systemProp)); 90 } catch (NoSuchMethodException nsme) { 91 assert false : "properties should be defined"; 92 } 93 94 return sheet; 95 } 96 } 97 | Popular Tags |