1 19 package org.netbeans.modules.j2ee.ddloaders.multiview; 20 21 import org.netbeans.modules.xml.multiview.ui.SectionNodeView; 22 import org.netbeans.modules.xml.multiview.ui.SectionNodeInnerPanel; 23 import org.netbeans.modules.j2ee.dd.api.ejb.Ejb; 24 import org.openide.nodes.Node; 25 26 import java.beans.PropertyChangeListener ; 27 import java.beans.PropertyChangeEvent ; 28 29 32 public class EjbNode extends EjbSectionNode { 33 34 public EjbNode(SectionNodeView sectionNodeView, final Ejb ejb, String iconBase) { 35 super(sectionNodeView, false, ejb, Utils.getEjbDisplayName(ejb), iconBase); 36 ejb.addPropertyChangeListener(new PropertyChangeListener () { 37 public void propertyChange(PropertyChangeEvent evt) { 38 String oldDisplayName = getDisplayName(); 39 String newDisplayName = Utils.getEjbDisplayName(ejb); 40 if (!oldDisplayName.equals(newDisplayName)) { 41 setDisplayName(newDisplayName); 42 firePropertyChange(Node.PROP_DISPLAY_NAME, oldDisplayName, newDisplayName); 43 } 44 } 45 }); 46 helpProvider = true; 47 } 48 49 protected SectionNodeInnerPanel createNodeInnerPanel() { 50 return null; 51 } 52 } 53 | Popular Tags |