1 19 20 package org.netbeans.modules.j2ee.ddloaders.web.multiview; 21 22 import org.netbeans.modules.j2ee.dd.api.web.SecurityConstraint; 23 import org.netbeans.modules.j2ee.ddloaders.web.DDDataObject; 24 import org.netbeans.modules.xml.multiview.ui.InnerPanelFactory; 25 import org.netbeans.modules.xml.multiview.ui.SectionInnerPanel; 26 import org.netbeans.modules.xml.multiview.ui.SectionView; 27 import org.netbeans.modules.xml.multiview.ui.ToolBarDesignEditor; 28 29 37 public class SecurityFactory implements InnerPanelFactory { 38 private ToolBarDesignEditor editor; 39 private DDDataObject dObj; 40 41 42 45 public SecurityFactory(ToolBarDesignEditor editor, DDDataObject dObj) { 46 this.editor = editor; 47 this.dObj = dObj; 48 } 49 50 public SectionInnerPanel createInnerPanel(Object key) { 51 if (key.equals("security_roles")) { return new SecurityRolesPanel((SectionView) editor.getContentView(), dObj); 53 } else if (key instanceof SecurityConstraint) { 54 return new SecurityConstraintPanel((SectionView) editor.getContentView(), dObj, 55 (SecurityConstraint) key); 56 } else if (key.equals("login_config")) { return new LoginConfigPanel((SectionView) editor.getContentView(), dObj); 58 } 59 60 return null; 61 } 62 } 63 | Popular Tags |