1 19 20 package org.netbeans.modules.j2ee.persistence.unit; 21 22 import org.netbeans.modules.j2ee.persistence.dd.persistence.model_1_0.PersistenceUnit; 23 import org.netbeans.modules.xml.multiview.ui.SectionView; 24 import org.netbeans.modules.xml.multiview.ui.ToolBarDesignEditor; 25 import org.netbeans.modules.xml.multiview.ui.SectionInnerPanel; 26 27 31 public class PanelFactory implements org.netbeans.modules.xml.multiview.ui.InnerPanelFactory { 32 private PUDataObject dObj; 33 ToolBarDesignEditor editor; 34 35 36 PanelFactory(ToolBarDesignEditor editor, PUDataObject dObj) { 37 this.dObj=dObj; 38 this.editor=editor; 39 } 40 41 public SectionInnerPanel createInnerPanel(Object key) { 42 if (key instanceof PersistenceUnit) { 43 return new PersistenceUnitPanel((SectionView)editor.getContentView(), dObj, (PersistenceUnit)key); 44 } 45 return null; 47 } 48 } 49 50 | Popular Tags |