1 19 20 package org.netbeans.modules.websvc.wsitconf.ui.service; 21 22 import javax.swing.undo.UndoManager ; 23 import org.netbeans.api.project.Project; 24 import org.netbeans.modules.websvc.api.jaxws.project.config.JaxWsModel; 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 import org.netbeans.modules.xml.wsdl.model.Binding; 29 import org.netbeans.modules.xml.wsdl.model.BindingFault; 30 import org.netbeans.modules.xml.wsdl.model.BindingInput; 31 import org.netbeans.modules.xml.wsdl.model.BindingOperation; 32 import org.netbeans.modules.xml.wsdl.model.BindingOutput; 33 import org.openide.nodes.Node; 34 35 39 public class ServicePanelFactory implements org.netbeans.modules.xml.multiview.ui.InnerPanelFactory { 40 41 private ToolBarDesignEditor editor; 42 private boolean isFromJava; 43 private Node node; 44 private UndoManager undoManager; 45 private Project project; 46 private JaxWsModel jaxwsmodel; 47 48 51 ServicePanelFactory(ToolBarDesignEditor editor, Node node, UndoManager undoManager, Project p, JaxWsModel jxwsmodel) { 52 this.editor=editor; 53 this.node = node; 54 this.project = p; 55 this.jaxwsmodel = jxwsmodel; 56 this.undoManager = undoManager; 57 this.isFromJava = false; 58 } 59 60 public SectionInnerPanel createInnerPanel(Object key) { 61 if (key instanceof Binding) { 62 Binding b = (Binding)key; 63 return new ServicePanel((SectionView) editor.getContentView(), node, project, b, undoManager, jaxwsmodel); 64 } 65 if (key instanceof BindingOperation) { 66 BindingOperation o = (BindingOperation)key; 67 return new OperationPanel((SectionView) editor.getContentView(), node, project, o, undoManager, jaxwsmodel); 68 } 69 if (key instanceof BindingInput) { 70 BindingInput i = (BindingInput)key; 71 return new InputPanel((SectionView) editor.getContentView(), node, i, undoManager); 72 } 73 if (key instanceof BindingOutput) { 74 BindingOutput o = (BindingOutput)key; 75 return new OutputPanel((SectionView) editor.getContentView(), node, o, undoManager); 76 } 77 if (key instanceof BindingFault) { 78 BindingFault f = (BindingFault)key; 79 return new FaultPanel((SectionView) editor.getContentView(), node, f, undoManager); 80 } 81 return null; 82 } 83 } 84 | Popular Tags |