KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > sun > ws7 > ui > WS70ConfigSelectorPanel


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-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 /*
21  * WS70ConfigSelectorPanel.java
22  */

23
24 package org.netbeans.modules.j2ee.sun.ws7.ui;
25
26 /**
27  *
28  * @author Administrator
29  */

30 public class WS70ConfigSelectorPanel extends javax.swing.JPanel JavaDoc {
31     String JavaDoc [] values;
32     /** Creates new form WS70ConfigSelectorPanel */
33     public WS70ConfigSelectorPanel(String JavaDoc[] vals) {
34         initComponents();
35         values = vals;
36         jConfigSelectionCb.setModel(new javax.swing.DefaultComboBoxModel JavaDoc(values));
37
38     }
39     public String JavaDoc[] getValues(){
40         return values;
41     }
42     public String JavaDoc getSelectedConfig(){
43         return (String JavaDoc)jConfigSelectionCb.getSelectedItem();
44     }
45     
46     /** This method is called from within the constructor to
47      * initialize the form.
48      * WARNING: Do NOT modify this code. The content of this method is
49      * always regenerated by the Form Editor.
50      */

51     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
52
private void initComponents() {
53         jConfigSelectionCb = new javax.swing.JComboBox JavaDoc();
54         jInstaructionLbl = new javax.swing.JLabel JavaDoc();
55         jConfigLbl = new javax.swing.JLabel JavaDoc();
56
57         jConfigSelectionCb.setEditable(true);
58         jConfigSelectionCb.getAccessibleContext().setAccessibleParent(this);
59
60         jInstaructionLbl.setLabelFor(jConfigSelectionCb);
61         jInstaructionLbl.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/ws7/ui/Bundle").getString("LBL_INSTRUCTIONS"));
62         jInstaructionLbl.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
63         jInstaructionLbl.getAccessibleContext().setAccessibleParent(this);
64
65         jConfigLbl.setLabelFor(jConfigSelectionCb);
66         jConfigLbl.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/ws7/ui/Bundle").getString("LBL_CONFIG"));
67
68         org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
69         this.setLayout(layout);
70         layout.setHorizontalGroup(
71             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
72             .add(layout.createSequentialGroup()
73                 .add(41, 41, 41)
74                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
75                     .add(jInstaructionLbl, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 240, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
76                     .add(layout.createSequentialGroup()
77                         .add(jConfigLbl)
78                         .add(37, 37, 37)
79                         .add(jConfigSelectionCb, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 122, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
80                 .add(52, 52, 52))
81         );
82         layout.setVerticalGroup(
83             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
84             .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
85                 .add(19, 19, 19)
86                 .add(jInstaructionLbl, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 58, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
87                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 35, Short.MAX_VALUE)
88                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
89                     .add(jConfigLbl)
90                     .add(jConfigSelectionCb, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
91                 .add(95, 95, 95))
92         );
93     }// </editor-fold>//GEN-END:initComponents
94

95     
96     // Variables declaration - do not modify//GEN-BEGIN:variables
97
private javax.swing.JLabel JavaDoc jConfigLbl;
98     private javax.swing.JComboBox JavaDoc jConfigSelectionCb;
99     private javax.swing.JLabel JavaDoc jInstaructionLbl;
100     // End of variables declaration//GEN-END:variables
101

102 }
103
Popular Tags