KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > ddloaders > web > multiview > MessageDestRefPanel


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 package org.netbeans.modules.j2ee.ddloaders.web.multiview;
21
22 /**
23  * MessageDestRefPanel.java
24  * Panel for adding/editing Message Destination References
25  *
26  * Created on April 14, 2005
27  * @author mkuchtiak
28  */

29 public class MessageDestRefPanel extends javax.swing.JPanel JavaDoc {
30
31     /** Creates new form ResRefPanel */
32     public MessageDestRefPanel() {
33         initComponents();
34         org.netbeans.modules.xml.multiview.Utils.makeTextAreaLikeTextField(descriptionTA, nameTF);
35     }
36
37     void setMessageDestRefName(String JavaDoc name) {
38         nameTF.setText(name);
39     }
40     
41     void setMessageDestRefType(String JavaDoc value) {
42         typeCB.setSelectedItem(value);
43     }
44     
45     void setUsage(String JavaDoc value) {
46         usageCB.setSelectedItem(value);
47     }
48     
49     void setLink(String JavaDoc value) {
50         linkTF.setText(value);
51     }
52     
53     void setDescription(String JavaDoc value) {
54         descriptionTA.setText(value);
55     }
56     
57     String JavaDoc getMessageDestRefName() {
58         return nameTF.getText();
59     }
60     
61     String JavaDoc getMessageDestRefType() {
62         return (String JavaDoc)typeCB.getSelectedItem();
63     }
64     
65     String JavaDoc getUsage() {
66         return (String JavaDoc)usageCB.getSelectedItem();
67     }
68     
69     String JavaDoc getLink() {
70         return linkTF.getText();
71     }
72     
73     String JavaDoc getDescription() {
74         return descriptionTA.getText();
75     }
76     
77     javax.swing.JTextField JavaDoc getNameTF() {
78         return nameTF;
79     }
80     
81     /** This method is called from within the constructor to
82      * initialize the form.
83      * WARNING: Do NOT modify this code. The content of this method is
84      * always regenerated by the Form Editor.
85      */

86     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
87
private void initComponents() {
88         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
89
90         buttonGroup1 = new javax.swing.ButtonGroup JavaDoc();
91         nameLabel = new javax.swing.JLabel JavaDoc();
92         nameTF = new javax.swing.JTextField JavaDoc();
93         typeLabel = new javax.swing.JLabel JavaDoc();
94         typeCB = new javax.swing.JComboBox JavaDoc();
95         usageLabel = new javax.swing.JLabel JavaDoc();
96         usageCB = new javax.swing.JComboBox JavaDoc();
97         linkLabel = new javax.swing.JLabel JavaDoc();
98         linkTF = new javax.swing.JTextField JavaDoc();
99         descriptionLabel = new javax.swing.JLabel JavaDoc();
100         descriptionTA = new javax.swing.JTextArea JavaDoc();
101
102         setLayout(new java.awt.GridBagLayout JavaDoc());
103
104         nameLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefName_mnem").charAt(0));
105         nameLabel.setLabelFor(nameTF);
106         nameLabel.setText(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefName"));
107         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
108         gridBagConstraints.gridx = 0;
109         gridBagConstraints.gridy = 0;
110         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
111         gridBagConstraints.insets = new java.awt.Insets JavaDoc(5, 12, 0, 0);
112         add(nameLabel, gridBagConstraints);
113
114         nameTF.setColumns(20);
115         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
116         gridBagConstraints.gridx = 1;
117         gridBagConstraints.gridy = 0;
118         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
119         gridBagConstraints.weightx = 1.0;
120         gridBagConstraints.insets = new java.awt.Insets JavaDoc(5, 12, 0, 12);
121         add(nameTF, gridBagConstraints);
122
123         typeLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefType_mnem").charAt(0));
124         typeLabel.setLabelFor(typeCB);
125         typeLabel.setText(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefType"));
126         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
127         gridBagConstraints.gridx = 0;
128         gridBagConstraints.gridy = 1;
129         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
130         gridBagConstraints.insets = new java.awt.Insets JavaDoc(5, 12, 0, 0);
131         add(typeLabel, gridBagConstraints);
132
133         typeCB.setModel(new javax.swing.DefaultComboBoxModel JavaDoc(new String JavaDoc[] { "javax.jms.Queue", "javax.jms.Topic" }));
134         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
135         gridBagConstraints.gridx = 1;
136         gridBagConstraints.gridy = 1;
137         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
138         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
139         gridBagConstraints.insets = new java.awt.Insets JavaDoc(5, 12, 0, 12);
140         add(typeCB, gridBagConstraints);
141
142         usageLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefUsage_mnem").charAt(0));
143         usageLabel.setLabelFor(usageCB);
144         usageLabel.setText(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefUsage"));
145         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
146         gridBagConstraints.gridx = 0;
147         gridBagConstraints.gridy = 2;
148         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
149         gridBagConstraints.insets = new java.awt.Insets JavaDoc(5, 12, 0, 0);
150         add(usageLabel, gridBagConstraints);
151
152         usageCB.setModel(new javax.swing.DefaultComboBoxModel JavaDoc(new String JavaDoc[] { "Consumes", "Produces", "ConsumesProduces" }));
153         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
154         gridBagConstraints.gridx = 1;
155         gridBagConstraints.gridy = 2;
156         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
157         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
158         gridBagConstraints.insets = new java.awt.Insets JavaDoc(5, 12, 0, 12);
159         add(usageCB, gridBagConstraints);
160
161         linkLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefLink_mnem").charAt(0));
162         linkLabel.setLabelFor(linkTF);
163         linkLabel.setText(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_MesDestRefLink"));
164         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
165         gridBagConstraints.gridx = 0;
166         gridBagConstraints.gridy = 3;
167         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
168         gridBagConstraints.insets = new java.awt.Insets JavaDoc(5, 12, 0, 0);
169         add(linkLabel, gridBagConstraints);
170
171         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
172         gridBagConstraints.gridx = 1;
173         gridBagConstraints.gridy = 3;
174         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
175         gridBagConstraints.insets = new java.awt.Insets JavaDoc(5, 12, 0, 12);
176         add(linkTF, gridBagConstraints);
177
178         descriptionLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_description_mnem").charAt(0));
179         descriptionLabel.setLabelFor(descriptionTA);
180         descriptionLabel.setText(org.openide.util.NbBundle.getMessage(MessageDestRefPanel.class, "LBL_description"));
181         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
182         gridBagConstraints.gridx = 0;
183         gridBagConstraints.gridy = 4;
184         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
185         gridBagConstraints.insets = new java.awt.Insets JavaDoc(5, 12, 0, 0);
186         add(descriptionLabel, gridBagConstraints);
187
188         descriptionTA.setRows(3);
189         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
190         gridBagConstraints.gridx = 1;
191         gridBagConstraints.gridy = 4;
192         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
193         gridBagConstraints.insets = new java.awt.Insets JavaDoc(5, 12, 0, 12);
194         add(descriptionTA, gridBagConstraints);
195
196     }
197     // </editor-fold>//GEN-END:initComponents
198

199     
200     // Variables declaration - do not modify//GEN-BEGIN:variables
201
private javax.swing.ButtonGroup JavaDoc buttonGroup1;
202     private javax.swing.JLabel JavaDoc descriptionLabel;
203     private javax.swing.JTextArea JavaDoc descriptionTA;
204     private javax.swing.JLabel JavaDoc linkLabel;
205     private javax.swing.JTextField JavaDoc linkTF;
206     private javax.swing.JLabel JavaDoc nameLabel;
207     private javax.swing.JTextField JavaDoc nameTF;
208     private javax.swing.JComboBox JavaDoc typeCB;
209     private javax.swing.JLabel JavaDoc typeLabel;
210     private javax.swing.JComboBox JavaDoc usageCB;
211     private javax.swing.JLabel JavaDoc usageLabel;
212     // End of variables declaration//GEN-END:variables
213

214 }
215
Popular Tags