KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > wsdl > ui > view > TemplatePanel


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 /*
21  * TemplatePanel.java
22  *
23  * Created on August 31, 2006, 11:59 AM
24  */

25
26 package org.netbeans.modules.xml.wsdl.ui.view;
27
28 import javax.swing.ButtonGroup JavaDoc;
29 import javax.swing.JRadioButton JavaDoc;
30
31 import org.netbeans.modules.xml.wsdl.ui.view.wizard.ExtensibilityElementTemplateFactory;
32 import org.netbeans.modules.xml.wsdl.ui.view.wizard.TemplateType;
33 import org.netbeans.modules.xml.wsdl.ui.view.wizard.localized.LocalizedTemplate;
34
35 /**
36  *
37  * @author skini
38  */

39 public class TemplatePanel extends javax.swing.JPanel JavaDoc {
40     
41     private LocalizedTemplate mlt;
42     private ButtonGroup JavaDoc btnGroup;
43     
44     /** Creates new form TemplatePanel */
45     public TemplatePanel(LocalizedTemplate lt, ButtonGroup JavaDoc btnGroup) {
46         this.mlt = lt;
47         this.btnGroup = btnGroup;
48         initComponents();
49         initGUI();
50     }
51     
52     /** This method is called from within the constructor to
53      * initialize the form.
54      * WARNING: Do NOT modify this code. The content of this method is
55      * always regenerated by the Form Editor.
56      */

57     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
58
private void initComponents() {
59         jRadioButton1 = new javax.swing.JRadioButton JavaDoc();
60
61         btnGroup.add(jRadioButton1);
62         jRadioButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
63         jRadioButton1.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
64
65         org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
66         this.setLayout(layout);
67         layout.setHorizontalGroup(
68             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
69             .add(layout.createSequentialGroup()
70                 .add(jRadioButton1)
71                 .addContainerGap(202, Short.MAX_VALUE))
72         );
73         layout.setVerticalGroup(
74             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
75             .add(layout.createSequentialGroup()
76                 .add(jRadioButton1)
77                 .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
78         );
79     }// </editor-fold>//GEN-END:initComponents
80

81     
82     // Variables declaration - do not modify//GEN-BEGIN:variables
83
private javax.swing.JRadioButton JavaDoc jRadioButton1;
84     // End of variables declaration//GEN-END:variables
85

86     private void initGUI() {
87         jRadioButton1.setText(this.mlt.getName());
88         
89     }
90     
91     public boolean isSelected() {
92         return jRadioButton1.isSelected();
93     }
94     
95     public JRadioButton JavaDoc getRadioButton() {
96         return this.jRadioButton1;
97     }
98     
99     public LocalizedTemplate getTemplate() {
100         return this.mlt;
101     }
102     
103     
104 }
105
Popular Tags