001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: /*
043: * OperationConfigurationPanel.java
044: *
045: * Created on August 25, 2006, 1:15 PM
046: */
047:
048: package org.netbeans.modules.xml.wsdl.ui.view;
049:
050: import java.beans.PropertyChangeEvent;
051: import java.beans.PropertyChangeListener;
052: import java.util.HashMap;
053: import java.util.List;
054: import java.util.Map;
055:
056: import javax.swing.JComboBox;
057: import javax.swing.JTextField;
058: import javax.swing.text.Document;
059:
060: import org.netbeans.api.project.Project;
061: import org.netbeans.modules.xml.wsdl.model.WSDLModel;
062:
063: /**
064: *
065: * @author radval
066: */
067: public class RequestReplyOperationPanel extends javax.swing.JPanel
068: implements OperationConfiguration {
069:
070: private Project mProject = null;
071: private Document mCommonOperationTextFieldDocument;
072: private Map<String, String> namespaceToPrefixMap = new HashMap<String, String>();
073: private boolean mIsShowMessageComboBoxes = false;
074: private WSDLModel mModel;
075: private boolean showPortType;
076:
077: /** Creates new form OperationConfigurationPanel
078: * @param project */
079: public RequestReplyOperationPanel(Project project,
080: Document operationNameTextFieldDocument,
081: Map<String, String> namespaceToPrefixMap,
082: boolean isShowMessageComboBoxes, WSDLModel model,
083: boolean showPortType) {
084: this .mProject = project;
085: this .mCommonOperationTextFieldDocument = operationNameTextFieldDocument;
086: this .namespaceToPrefixMap = namespaceToPrefixMap;
087: this .mIsShowMessageComboBoxes = isShowMessageComboBoxes;
088: mModel = model;
089: this .showPortType = showPortType;
090: initComponents();
091: initGUI();
092: }
093:
094: /** Mattise require default constructor otherwise will not load in design view of mattise
095: **/
096: public RequestReplyOperationPanel() {
097: initComponents();
098: initGUI();
099: }
100:
101: /** This method is called from within the constructor to
102: * initialize the form.
103: * WARNING: Do NOT modify this code. The content of this method is
104: * always regenerated by the Form Editor.
105: */
106: // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
107: private void initComponents() {
108:
109: portTypeNameLabel = new javax.swing.JLabel();
110: portTypeNameTextField = new javax.swing.JTextField();
111: OperationNameLabel = new javax.swing.JLabel();
112: operationNameTextField = new javax.swing.JTextField();
113: if (mCommonOperationTextFieldDocument != null) {
114: operationNameTextField
115: .setDocument(mCommonOperationTextFieldDocument);
116: }
117: operationTypeLabel = new javax.swing.JLabel();
118: operationTypeComboBox = new javax.swing.JComboBox();
119: inputLabel = new javax.swing.JLabel();
120: inputPanel = new javax.swing.JPanel();
121: inputMessagePartsConfigurationTable = new org.netbeans.modules.xml.wsdl.ui.view.CommonMessageConfigurationPanel(
122: mProject, namespaceToPrefixMap, mModel);
123: inputMessageNameConfigurationPanel1 = new MessageNameConfigurationPanel(
124: this .inputMessagePartsConfigurationTable);
125: inputMessagePartsConfigurationTable = inputMessagePartsConfigurationTable;
126: outputLabel = new javax.swing.JLabel();
127: outputPanel = new javax.swing.JPanel();
128: outputMessagePartsConfigurationTable = new org.netbeans.modules.xml.wsdl.ui.view.CommonMessageConfigurationPanel(
129: mProject, namespaceToPrefixMap, mModel);
130: outputMessageNameConfigurationPanel1 = new MessageNameConfigurationPanel(
131: this .outputMessagePartsConfigurationTable);
132: outputMessagePartsConfigurationTable = outputMessagePartsConfigurationTable;
133: faultLabel = new javax.swing.JLabel();
134: faultPanel = new javax.swing.JPanel();
135: faultMessagePartsConfigurationTable = new org.netbeans.modules.xml.wsdl.ui.view.CommonMessageConfigurationPanel(
136: mProject, namespaceToPrefixMap, mModel);
137: faultMessageNameConfigurationPanel1 = new MessageNameConfigurationPanel(
138: this .faultMessagePartsConfigurationTable);
139: faultMessagePartsConfigurationTable = faultMessagePartsConfigurationTable;
140: autoGenPartnerLinkTypeCheckBox = new javax.swing.JCheckBox();
141:
142: setName("Form"); // NOI18N
143:
144: portTypeNameLabel.setLabelFor(portTypeNameTextField);
145: org.openide.awt.Mnemonics
146: .setLocalizedText(
147: portTypeNameLabel,
148: org.openide.util.NbBundle
149: .getMessage(
150: RequestReplyOperationPanel.class,
151: "RequestReplyOperationPanel.portTypeNameLabel.text")); // NOI18N
152: portTypeNameLabel
153: .setToolTipText(org.openide.util.NbBundle
154: .getMessage(RequestReplyOperationPanel.class,
155: "RequestReplyOperationPanel.portTypeNameLabel.toolTipText")); // NOI18N
156: portTypeNameLabel.setName("portTypeNameLabel"); // NOI18N
157:
158: portTypeNameTextField.setName("portTypeNameTextField"); // NOI18N
159:
160: OperationNameLabel.setLabelFor(operationNameTextField);
161: org.openide.awt.Mnemonics
162: .setLocalizedText(
163: OperationNameLabel,
164: org.openide.util.NbBundle
165: .getMessage(
166: RequestReplyOperationPanel.class,
167: "RequestReplyOperationPanel.OperationNameLabel.text")); // NOI18N
168: OperationNameLabel
169: .setToolTipText(org.openide.util.NbBundle
170: .getMessage(RequestReplyOperationPanel.class,
171: "RequestReplyOperationPanel.OperationNameLabel.toolTipText")); // NOI18N
172: OperationNameLabel.setName("OperationNameLabel"); // NOI18N
173:
174: operationNameTextField.setName("operationNameTextField"); // NOI18N
175:
176: operationTypeLabel.setLabelFor(operationTypeComboBox);
177: org.openide.awt.Mnemonics
178: .setLocalizedText(
179: operationTypeLabel,
180: org.openide.util.NbBundle
181: .getMessage(
182: RequestReplyOperationPanel.class,
183: "RequestReplyOperationPanel.operationTypeLabel.text")); // NOI18N
184: operationTypeLabel
185: .setToolTipText(org.openide.util.NbBundle
186: .getMessage(RequestReplyOperationPanel.class,
187: "RequestReplyOperationPanel.operationTypeLabel.toolTipText")); // NOI18N
188: operationTypeLabel.setName("operationTypeLabel"); // NOI18N
189:
190: operationTypeComboBox
191: .setModel(new javax.swing.DefaultComboBoxModel(
192: new String[] { "Request-Response Operation",
193: "One-Way Operation" }));
194: operationTypeComboBox
195: .setToolTipText(org.openide.util.NbBundle
196: .getMessage(RequestReplyOperationPanel.class,
197: "RequestReplyOperationPanel.operationTypeComboBox.toolTipText")); // NOI18N
198: operationTypeComboBox.setName("operationTypeComboBox"); // NOI18N
199:
200: org.openide.awt.Mnemonics.setLocalizedText(inputLabel,
201: org.openide.util.NbBundle.getMessage(
202: RequestReplyOperationPanel.class,
203: "RequestReplyOperationPanel.inputLabel.text")); // NOI18N
204: inputLabel.setToolTipText(org.openide.util.NbBundle.getMessage(
205: RequestReplyOperationPanel.class,
206: "RequestReplyOperationPanel.inputLabel.toolTipText")); // NOI18N
207: inputLabel.setName("inputLabel"); // NOI18N
208:
209: inputPanel.setName("inputPanel"); // NOI18N
210: inputPanel.setLayout(new javax.swing.BoxLayout(inputPanel,
211: javax.swing.BoxLayout.Y_AXIS));
212:
213: inputMessageNameConfigurationPanel1
214: .setToolTipText(org.openide.util.NbBundle
215: .getMessage(RequestReplyOperationPanel.class,
216: "RequestReplyOperationPanel.inputMessageNameConfigurationPanel1.toolTipText")); // NOI18N
217: inputMessageNameConfigurationPanel1
218: .setName("inputMessageNameConfigurationPanel1"); // NOI18N
219: inputPanel.add(inputMessageNameConfigurationPanel1);
220:
221: inputMessagePartsConfigurationTable
222: .setName("inputMessagePartsConfigurationTable"); // NOI18N
223: inputPanel.add(inputMessagePartsConfigurationTable);
224:
225: org.openide.awt.Mnemonics.setLocalizedText(outputLabel,
226: org.openide.util.NbBundle.getMessage(
227: RequestReplyOperationPanel.class,
228: "RequestReplyOperationPanel.outputLabel.text")); // NOI18N
229: outputLabel
230: .setToolTipText(org.openide.util.NbBundle
231: .getMessage(RequestReplyOperationPanel.class,
232: "RequestReplyOperationPanel.outputLabel.toolTipText")); // NOI18N
233: outputLabel.setName("outputLabel"); // NOI18N
234:
235: outputPanel.setName("outputPanel"); // NOI18N
236: outputPanel.setLayout(new javax.swing.BoxLayout(outputPanel,
237: javax.swing.BoxLayout.Y_AXIS));
238:
239: outputMessageNameConfigurationPanel1
240: .setToolTipText(org.openide.util.NbBundle
241: .getMessage(RequestReplyOperationPanel.class,
242: "RequestReplyOperationPanel.outputMessageNameConfigurationPanel1.toolTipText")); // NOI18N
243: outputMessageNameConfigurationPanel1
244: .setName("outputMessageNameConfigurationPanel1"); // NOI18N
245: outputPanel.add(outputMessageNameConfigurationPanel1);
246:
247: outputMessagePartsConfigurationTable
248: .setName("outputMessagePartsConfigurationTable"); // NOI18N
249: outputPanel.add(outputMessagePartsConfigurationTable);
250:
251: org.openide.awt.Mnemonics.setLocalizedText(faultLabel,
252: org.openide.util.NbBundle.getMessage(
253: RequestReplyOperationPanel.class,
254: "RequestReplyOperationPanel.faultLabel.text")); // NOI18N
255: faultLabel.setToolTipText(org.openide.util.NbBundle.getMessage(
256: RequestReplyOperationPanel.class,
257: "RequestReplyOperationPanel.faultLabel.toolTipText")); // NOI18N
258: faultLabel.setName("faultLabel"); // NOI18N
259:
260: faultPanel.setName("faultPanel"); // NOI18N
261: faultPanel.setLayout(new javax.swing.BoxLayout(faultPanel,
262: javax.swing.BoxLayout.Y_AXIS));
263:
264: faultMessageNameConfigurationPanel1
265: .setToolTipText(org.openide.util.NbBundle
266: .getMessage(RequestReplyOperationPanel.class,
267: "RequestReplyOperationPanel.outputMessageNameConfigurationPanel1.toolTipText")); // NOI18N
268: faultMessageNameConfigurationPanel1
269: .setName("faultMessageNameConfigurationPanel1"); // NOI18N
270: faultPanel.add(faultMessageNameConfigurationPanel1);
271:
272: faultMessagePartsConfigurationTable
273: .setName("faultMessagePartsConfigurationTable"); // NOI18N
274: faultPanel.add(faultMessagePartsConfigurationTable);
275:
276: autoGenPartnerLinkTypeCheckBox.setSelected(true);
277: org.openide.awt.Mnemonics
278: .setLocalizedText(
279: autoGenPartnerLinkTypeCheckBox,
280: org.openide.util.NbBundle
281: .getMessage(
282: RequestReplyOperationPanel.class,
283: "LBL_autoGeneratePartnerLinktypeCheckBox.text")); // NOI18N
284: autoGenPartnerLinkTypeCheckBox
285: .setToolTipText(org.openide.util.NbBundle
286: .getMessage(RequestReplyOperationPanel.class,
287: "TT_autoGeneratePartnerLinktypeCheckBox.toolTipText")); // NOI18N
288: autoGenPartnerLinkTypeCheckBox
289: .setName("autoGenPartnerLinkTypeCheckBox"); // NOI18N
290:
291: org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
292: this );
293: this .setLayout(layout);
294: layout
295: .setHorizontalGroup(layout
296: .createParallelGroup(
297: org.jdesktop.layout.GroupLayout.LEADING)
298: .add(
299: org.jdesktop.layout.GroupLayout.TRAILING,
300: layout
301: .createSequentialGroup()
302: .addContainerGap()
303: .add(
304: layout
305: .createParallelGroup(
306: org.jdesktop.layout.GroupLayout.TRAILING)
307: .add(
308: org.jdesktop.layout.GroupLayout.LEADING,
309: autoGenPartnerLinkTypeCheckBox,
310: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
311: 490,
312: Short.MAX_VALUE)
313: .add(
314: layout
315: .createSequentialGroup()
316: .add(
317: layout
318: .createParallelGroup(
319: org.jdesktop.layout.GroupLayout.TRAILING,
320: false)
321: .add(
322: org.jdesktop.layout.GroupLayout.LEADING,
323: OperationNameLabel,
324: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
325: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
326: Short.MAX_VALUE)
327: .add(
328: org.jdesktop.layout.GroupLayout.LEADING,
329: inputLabel,
330: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
331: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
332: Short.MAX_VALUE)
333: .add(
334: org.jdesktop.layout.GroupLayout.LEADING,
335: operationTypeLabel,
336: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
337: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
338: Short.MAX_VALUE)
339: .add(
340: org.jdesktop.layout.GroupLayout.LEADING,
341: faultLabel,
342: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
343: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
344: Short.MAX_VALUE)
345: .add(
346: org.jdesktop.layout.GroupLayout.LEADING,
347: outputLabel,
348: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
349: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
350: Short.MAX_VALUE)
351: .add(
352: portTypeNameLabel,
353: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
354: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
355: Short.MAX_VALUE))
356: .addPreferredGap(
357: org.jdesktop.layout.LayoutStyle.RELATED)
358: .add(
359: layout
360: .createParallelGroup(
361: org.jdesktop.layout.GroupLayout.LEADING)
362: .add(
363: faultPanel,
364: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
365: 404,
366: Short.MAX_VALUE)
367: .add(
368: outputPanel,
369: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
370: 404,
371: Short.MAX_VALUE)
372: .add(
373: inputPanel,
374: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
375: 404,
376: Short.MAX_VALUE)
377: .add(
378: operationTypeComboBox,
379: 0,
380: 404,
381: Short.MAX_VALUE)
382: .add(
383: operationNameTextField,
384: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
385: 404,
386: Short.MAX_VALUE)
387: .add(
388: portTypeNameTextField,
389: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
390: 404,
391: Short.MAX_VALUE))))
392: .addContainerGap()));
393: layout
394: .setVerticalGroup(layout
395: .createParallelGroup(
396: org.jdesktop.layout.GroupLayout.LEADING)
397: .add(
398: layout
399: .createSequentialGroup()
400: .add(
401: layout
402: .createParallelGroup(
403: org.jdesktop.layout.GroupLayout.BASELINE)
404: .add(
405: portTypeNameTextField,
406: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
407: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
408: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
409: .add(
410: portTypeNameLabel))
411: .addPreferredGap(
412: org.jdesktop.layout.LayoutStyle.RELATED)
413: .add(
414: layout
415: .createParallelGroup(
416: org.jdesktop.layout.GroupLayout.BASELINE)
417: .add(
418: OperationNameLabel)
419: .add(
420: operationNameTextField,
421: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
422: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
423: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
424: .addPreferredGap(
425: org.jdesktop.layout.LayoutStyle.RELATED)
426: .add(
427: layout
428: .createParallelGroup(
429: org.jdesktop.layout.GroupLayout.BASELINE)
430: .add(
431: operationTypeLabel)
432: .add(
433: operationTypeComboBox,
434: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
435: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
436: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
437: .addPreferredGap(
438: org.jdesktop.layout.LayoutStyle.UNRELATED)
439: .add(
440: layout
441: .createParallelGroup(
442: org.jdesktop.layout.GroupLayout.LEADING)
443: .add(
444: inputPanel,
445: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
446: 125,
447: Short.MAX_VALUE)
448: .add(inputLabel))
449: .addPreferredGap(
450: org.jdesktop.layout.LayoutStyle.UNRELATED)
451: .add(
452: layout
453: .createParallelGroup(
454: org.jdesktop.layout.GroupLayout.LEADING)
455: .add(
456: outputPanel,
457: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
458: 125,
459: Short.MAX_VALUE)
460: .add(
461: outputLabel))
462: .addPreferredGap(
463: org.jdesktop.layout.LayoutStyle.UNRELATED)
464: .add(
465: layout
466: .createParallelGroup(
467: org.jdesktop.layout.GroupLayout.LEADING)
468: .add(faultLabel)
469: .add(
470: faultPanel,
471: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
472: 125,
473: Short.MAX_VALUE))
474: .addPreferredGap(
475: org.jdesktop.layout.LayoutStyle.RELATED)
476: .add(
477: autoGenPartnerLinkTypeCheckBox)
478: .addContainerGap()));
479: }// </editor-fold>//GEN-END:initComponents
480:
481: public String getOperationName() {
482: return this .operationNameTextField.getText();
483: }
484:
485: public void setOperationName(String operationName) {
486: this .operationNameTextField.setText(operationName);
487: }
488:
489: public OperationType getOperationType() {
490: return (OperationType) this .operationTypeComboBox
491: .getSelectedItem();
492: }
493:
494: public JComboBox getOperationTypeComboBox() {
495: return this .operationTypeComboBox;
496: }
497:
498: public List<PartAndElementOrTypeTableModel.PartAndElementOrType> getInputMessageParts() {
499: return inputMessagePartsConfigurationTable
500: .getPartAndElementOrType();
501: }
502:
503: public List<PartAndElementOrTypeTableModel.PartAndElementOrType> getOutputMessageParts() {
504: return outputMessagePartsConfigurationTable
505: .getPartAndElementOrType();
506: }
507:
508: public List<PartAndElementOrTypeTableModel.PartAndElementOrType> getFaultMessageParts() {
509: return faultMessagePartsConfigurationTable
510: .getPartAndElementOrType();
511: }
512:
513: public void setInputMessages(String[] existingMessages,
514: String newMessageName,
515: javax.swing.event.DocumentListener msgNameDocumentListener) {
516: inputMessageNameConfigurationPanel1.setMessages(
517: existingMessages, newMessageName,
518: msgNameDocumentListener);
519: }
520:
521: public void setOutputMessages(String[] existingMessages,
522: String newMessageName,
523: javax.swing.event.DocumentListener msgNameDocumentListener) {
524: outputMessageNameConfigurationPanel1.setMessages(
525: existingMessages, newMessageName,
526: msgNameDocumentListener);
527: }
528:
529: public void setFaultMessages(String[] existingMessages,
530: String newMessageName,
531: javax.swing.event.DocumentListener msgNameDocumentListener) {
532: faultMessageNameConfigurationPanel1.setMessages(
533: existingMessages, newMessageName,
534: msgNameDocumentListener);
535: }
536:
537: public boolean isNewInputMessage() {
538: return inputMessageNameConfigurationPanel1.isNewMessage();
539: }
540:
541: public boolean isNewOutputMessage() {
542: return outputMessageNameConfigurationPanel1.isNewMessage();
543: }
544:
545: public boolean isNewFaultMessage() {
546: return faultMessageNameConfigurationPanel1.isNewMessage();
547: }
548:
549: public String getOutputMessageName() {
550: return this .outputMessageNameConfigurationPanel1
551: .getMessageName();
552: }
553:
554: public String getInputMessageName() {
555: return this .inputMessageNameConfigurationPanel1
556: .getMessageName();
557: }
558:
559: public String getFaultMessageName() {
560: return this .faultMessageNameConfigurationPanel1
561: .getMessageName();
562: }
563:
564: private void initGUI() {
565: inputMessagePartsConfigurationTable.addNewRow();
566: inputMessagePartsConfigurationTable.clearSelection();
567: outputMessagePartsConfigurationTable.addNewRow();
568: outputMessagePartsConfigurationTable.clearSelection();
569:
570: faultMessagePartsConfigurationTable.addPropertyChangeListener(
571: CommonMessageConfigurationPanel.PARTS_LISTENER,
572: new PropertyChangeListener() {
573:
574: public void propertyChange(PropertyChangeEvent evt) {
575: firePropertyChange(
576: OperationConfigurationPanel.FAULT_PARTS_LISTENER,
577: evt.getOldValue(), evt.getNewValue());
578: }
579:
580: });
581:
582: inputMessageNameConfigurationPanel1
583: .setVisible(this .mIsShowMessageComboBoxes);
584: outputMessageNameConfigurationPanel1
585: .setVisible(this .mIsShowMessageComboBoxes);
586: faultMessageNameConfigurationPanel1
587: .setVisible(this .mIsShowMessageComboBoxes);
588: inputMessageNameConfigurationPanel1
589: .setEnabled(this .mIsShowMessageComboBoxes);
590: outputMessageNameConfigurationPanel1
591: .setEnabled(this .mIsShowMessageComboBoxes);
592: faultMessageNameConfigurationPanel1
593: .setEnabled(this .mIsShowMessageComboBoxes);
594:
595: if (mIsShowMessageComboBoxes) {
596: inputLabel.setLabelFor(inputMessageNameConfigurationPanel1);
597: outputLabel
598: .setLabelFor(outputMessageNameConfigurationPanel1);
599: faultLabel.setLabelFor(faultMessageNameConfigurationPanel1);
600: } else {
601: inputLabel.setLabelFor(inputMessagePartsConfigurationTable);
602: outputLabel
603: .setLabelFor(outputMessagePartsConfigurationTable);
604: faultLabel.setLabelFor(faultMessagePartsConfigurationTable);
605: }
606:
607: portTypeNameLabel.setEnabled(showPortType);
608: portTypeNameTextField.setEnabled(showPortType);
609: portTypeNameLabel.setVisible(showPortType);
610: portTypeNameTextField.setVisible(showPortType);
611: autoGenPartnerLinkTypeCheckBox.setVisible(showPortType);
612: autoGenPartnerLinkTypeCheckBox.setEnabled(showPortType);
613:
614: }
615:
616: public JTextField getOperationNameTextField() {
617: return this .operationNameTextField;
618: }
619:
620: public String getPortTypeName() {
621: return portTypeNameTextField.getText();
622: }
623:
624: public JTextField getPortTypeNameTextField() {
625: return portTypeNameTextField;
626: }
627:
628: public void setPortTypeName(String portTypeName) {
629: portTypeNameTextField.setText(portTypeName);
630: }
631:
632: public static void main(String[] args) {
633:
634: /* JFrame frame = new JFrame();
635: frame.getContentPane().setLayout(new BorderLayout());
636: OperationConfigurationPanel p = new OperationConfigurationPanel();
637: frame.getContentPane().add(p, BorderLayout.CENTER);
638: frame.setSize(200, 200);
639: frame.setVisible(true);*/
640:
641: }
642:
643: // Variables declaration - do not modify//GEN-BEGIN:variables
644: private javax.swing.JLabel OperationNameLabel;
645: private javax.swing.JCheckBox autoGenPartnerLinkTypeCheckBox;
646: private javax.swing.JLabel faultLabel;
647: private org.netbeans.modules.xml.wsdl.ui.view.MessageNameConfigurationPanel faultMessageNameConfigurationPanel1;
648: private org.netbeans.modules.xml.wsdl.ui.view.CommonMessageConfigurationPanel faultMessagePartsConfigurationTable;
649: private javax.swing.JPanel faultPanel;
650: private javax.swing.JLabel inputLabel;
651: private org.netbeans.modules.xml.wsdl.ui.view.MessageNameConfigurationPanel inputMessageNameConfigurationPanel1;
652: private org.netbeans.modules.xml.wsdl.ui.view.CommonMessageConfigurationPanel inputMessagePartsConfigurationTable;
653: private javax.swing.JPanel inputPanel;
654: private javax.swing.JTextField operationNameTextField;
655: private javax.swing.JComboBox operationTypeComboBox;
656: private javax.swing.JLabel operationTypeLabel;
657: private javax.swing.JLabel outputLabel;
658: private org.netbeans.modules.xml.wsdl.ui.view.MessageNameConfigurationPanel outputMessageNameConfigurationPanel1;
659: private org.netbeans.modules.xml.wsdl.ui.view.CommonMessageConfigurationPanel outputMessagePartsConfigurationTable;
660: private javax.swing.JPanel outputPanel;
661: private javax.swing.JLabel portTypeNameLabel;
662: private javax.swing.JTextField portTypeNameTextField;
663:
664: // End of variables declaration//GEN-END:variables
665:
666: public boolean isAutoGeneratePartnerLinkType() {
667: return autoGenPartnerLinkTypeCheckBox.isEnabled()
668: && autoGenPartnerLinkTypeCheckBox.isSelected();
669: }
670:
671: public void setAutoGeneratePartnerLinkType(
672: boolean autoGenPartnerLinkType) {
673: autoGenPartnerLinkTypeCheckBox
674: .setSelected(autoGenPartnerLinkType);
675: }
676:
677: }
|