KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > ddloaders > multiview > ui > MessageDrivenOverviewForm


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.multiview.ui;
21
22 import org.netbeans.modules.xml.multiview.Refreshable;
23 import org.netbeans.modules.xml.multiview.ui.SectionNodeInnerPanel;
24 import org.netbeans.modules.xml.multiview.ui.SectionNodeView;
25
26 import javax.swing.*;
27
28 /**
29  * @author pfiala
30  */

31 public class MessageDrivenOverviewForm extends SectionNodeInnerPanel {
32
33     private static final String JavaDoc ACKNOWLEDGE_MODE_AUTO = "Auto-acknowledge"; //NOI18N
34
private static final String JavaDoc ACKNOWLEDGE_MODE_DUPS_OK = "Dups-ok-acknowledge"; //NOI18N
35
/**
36      * Creates new form MessageDrivenOverviewForm
37      *
38      * @param sectionNodeView enclosing SectionNodeView object
39      */

40     public MessageDrivenOverviewForm(SectionNodeView sectionNodeView) {
41         super(sectionNodeView);
42         initComponents();
43         beanTransactionTypeRadioButton.putClientProperty(Refreshable.PROPERTY_FIXED_VALUE, SessionOverviewForm.TRANSACTION_TYPE_BEAN);
44         containerTransactionTypeRadioButton.putClientProperty(Refreshable.PROPERTY_FIXED_VALUE, SessionOverviewForm.TRANSACTION_TYPE_CONTAINER);
45         autoAckModeRadioButton.putClientProperty(Refreshable.PROPERTY_FIXED_VALUE, ACKNOWLEDGE_MODE_AUTO);
46         dupsOkAckModeRadioButton.putClientProperty(Refreshable.PROPERTY_FIXED_VALUE, ACKNOWLEDGE_MODE_DUPS_OK);
47     }
48
49     /**
50      * This method is called from within the constructor to
51      * initialize the form.
52      * WARNING: Do NOT modify this code. The content of this method is
53      * always regenerated by the Form Editor.
54      */

55     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
56
private void initComponents() {
57         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
58
59         transactionTypeButtonGroup = new javax.swing.ButtonGroup JavaDoc();
60         acknowledgeModeButtonGroup = new javax.swing.ButtonGroup JavaDoc();
61         jLabel1 = new javax.swing.JLabel JavaDoc();
62         jLabel2 = new javax.swing.JLabel JavaDoc();
63         jLabel3 = new javax.swing.JLabel JavaDoc();
64         jLabel4 = new javax.swing.JLabel JavaDoc();
65         jLabel5 = new javax.swing.JLabel JavaDoc();
66         jLabel6 = new javax.swing.JLabel JavaDoc();
67         spacerLabel = new javax.swing.JLabel JavaDoc();
68         nameTextField = new javax.swing.JTextField JavaDoc();
69         beanTransactionTypeRadioButton = new javax.swing.JRadioButton JavaDoc();
70         containerTransactionTypeRadioButton = new javax.swing.JRadioButton JavaDoc();
71         messageSelectorTextField = new javax.swing.JTextField JavaDoc();
72         autoAckModeRadioButton = new javax.swing.JRadioButton JavaDoc();
73         dupsOkAckModeRadioButton = new javax.swing.JRadioButton JavaDoc();
74         destinationTypeComboBox = new javax.swing.JComboBox JavaDoc();
75         durabilityComboBox = new javax.swing.JComboBox JavaDoc();
76
77         setLayout(new java.awt.GridBagLayout JavaDoc());
78
79         jLabel1.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_EjbName"));
80         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
81         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
82         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 2, 2, 6);
83         add(jLabel1, gridBagConstraints);
84
85         jLabel2.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_TransactionType"));
86         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
87         gridBagConstraints.gridx = 0;
88         gridBagConstraints.gridy = 1;
89         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
90         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 2, 2, 6);
91         add(jLabel2, gridBagConstraints);
92
93         jLabel3.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_MessageSelector"));
94         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
95         gridBagConstraints.gridx = 0;
96         gridBagConstraints.gridy = 2;
97         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
98         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 2, 2, 6);
99         add(jLabel3, gridBagConstraints);
100
101         jLabel4.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_AcknowledgeMode"));
102         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
103         gridBagConstraints.gridx = 0;
104         gridBagConstraints.gridy = 3;
105         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
106         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 2, 2, 6);
107         add(jLabel4, gridBagConstraints);
108
109         jLabel5.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_DestinationType"));
110         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
111         gridBagConstraints.gridx = 0;
112         gridBagConstraints.gridy = 4;
113         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
114         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 2, 2, 6);
115         add(jLabel5, gridBagConstraints);
116
117         jLabel6.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_Durability"));
118         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
119         gridBagConstraints.gridx = 0;
120         gridBagConstraints.gridy = 5;
121         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
122         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 2, 2, 6);
123         add(jLabel6, gridBagConstraints);
124
125         spacerLabel.setText(" ");
126         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
127         gridBagConstraints.gridx = 4;
128         gridBagConstraints.gridy = 6;
129         gridBagConstraints.weightx = 1.0;
130         gridBagConstraints.weighty = 1.0;
131         add(spacerLabel, gridBagConstraints);
132
133         nameTextField.setColumns(25);
134         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
135         gridBagConstraints.gridwidth = 3;
136         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
137         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 2, 2, 2);
138         add(nameTextField, gridBagConstraints);
139
140         transactionTypeButtonGroup.add(beanTransactionTypeRadioButton);
141         beanTransactionTypeRadioButton.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_Bean"));
142         beanTransactionTypeRadioButton.setOpaque(false);
143         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
144         gridBagConstraints.gridx = 1;
145         gridBagConstraints.gridy = 1;
146         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
147         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 2, 2, 2);
148         add(beanTransactionTypeRadioButton, gridBagConstraints);
149
150         transactionTypeButtonGroup.add(containerTransactionTypeRadioButton);
151         containerTransactionTypeRadioButton.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_Container"));
152         containerTransactionTypeRadioButton.setOpaque(false);
153         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
154         gridBagConstraints.gridx = 2;
155         gridBagConstraints.gridy = 1;
156         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
157         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 2, 2, 2);
158         add(containerTransactionTypeRadioButton, gridBagConstraints);
159
160         messageSelectorTextField.setColumns(25);
161         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
162         gridBagConstraints.gridx = 1;
163         gridBagConstraints.gridy = 2;
164         gridBagConstraints.gridwidth = 3;
165         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
166         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 2, 2, 2);
167         add(messageSelectorTextField, gridBagConstraints);
168
169         acknowledgeModeButtonGroup.add(autoAckModeRadioButton);
170         autoAckModeRadioButton.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_Auto"));
171         autoAckModeRadioButton.setOpaque(false);
172         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
173         gridBagConstraints.gridx = 1;
174         gridBagConstraints.gridy = 3;
175         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
176         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 2, 2, 2);
177         add(autoAckModeRadioButton, gridBagConstraints);
178
179         acknowledgeModeButtonGroup.add(dupsOkAckModeRadioButton);
180         dupsOkAckModeRadioButton.setText(org.openide.util.NbBundle.getMessage(MessageDrivenOverviewForm.class, "LBL_DupsOk"));
181         dupsOkAckModeRadioButton.setOpaque(false);
182         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
183         gridBagConstraints.gridx = 2;
184         gridBagConstraints.gridy = 3;
185         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
186         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 2, 2, 2);
187         add(dupsOkAckModeRadioButton, gridBagConstraints);
188
189         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
190         gridBagConstraints.gridx = 1;
191         gridBagConstraints.gridy = 4;
192         gridBagConstraints.gridwidth = 2;
193         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
194         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 2, 2, 2);
195         add(destinationTypeComboBox, gridBagConstraints);
196
197         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
198         gridBagConstraints.gridx = 1;
199         gridBagConstraints.gridy = 5;
200         gridBagConstraints.gridwidth = 2;
201         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
202         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 2, 2, 2);
203         add(durabilityComboBox, gridBagConstraints);
204
205     }
206     // </editor-fold>//GEN-END:initComponents
207

208     // Variables declaration - do not modify//GEN-BEGIN:variables
209
private javax.swing.ButtonGroup JavaDoc acknowledgeModeButtonGroup;
210     private javax.swing.JRadioButton JavaDoc autoAckModeRadioButton;
211     private javax.swing.JRadioButton JavaDoc beanTransactionTypeRadioButton;
212     private javax.swing.JRadioButton JavaDoc containerTransactionTypeRadioButton;
213     private javax.swing.JComboBox JavaDoc destinationTypeComboBox;
214     private javax.swing.JRadioButton JavaDoc dupsOkAckModeRadioButton;
215     private javax.swing.JComboBox JavaDoc durabilityComboBox;
216     private javax.swing.JLabel JavaDoc jLabel1;
217     private javax.swing.JLabel JavaDoc jLabel2;
218     private javax.swing.JLabel JavaDoc jLabel3;
219     private javax.swing.JLabel JavaDoc jLabel4;
220     private javax.swing.JLabel JavaDoc jLabel5;
221     private javax.swing.JLabel JavaDoc jLabel6;
222     private javax.swing.JTextField JavaDoc messageSelectorTextField;
223     private javax.swing.JTextField JavaDoc nameTextField;
224     private javax.swing.JLabel JavaDoc spacerLabel;
225     private javax.swing.ButtonGroup JavaDoc transactionTypeButtonGroup;
226     // End of variables declaration//GEN-END:variables
227

228     public void setValue(JComponent source, Object JavaDoc value) {
229     }
230
231     public void linkButtonPressed(Object JavaDoc ddBean, String JavaDoc ddProperty) {
232     }
233
234     public JComponent getErrorComponent(String JavaDoc errorId) {
235         return null;
236     }
237
238     public ButtonGroup getAcknowledgeModeButtonGroup() {
239         return acknowledgeModeButtonGroup;
240     }
241
242     public JRadioButton getAutoAckModeRadioButton() {
243         return autoAckModeRadioButton;
244     }
245
246     public JRadioButton getBeanTransactionTypeRadioButton() {
247         return beanTransactionTypeRadioButton;
248     }
249
250     public JRadioButton getContainerTransactionTypeRadioButton() {
251         return containerTransactionTypeRadioButton;
252     }
253
254     public JComboBox getDestinationTypeComboBox() {
255         return destinationTypeComboBox;
256     }
257
258     public JRadioButton getDupsOkAckModeRadioButton() {
259         return dupsOkAckModeRadioButton;
260     }
261
262     public JComboBox getDurabilityComboBox() {
263         return durabilityComboBox;
264     }
265
266     public JTextField getMessageSelectorTextField() {
267         return messageSelectorTextField;
268     }
269
270     public JTextField getNameTextField() {
271         return nameTextField;
272     }
273
274     public ButtonGroup getTransactionTypeButtonGroup() {
275         return transactionTypeButtonGroup;
276     }
277 }
278
Popular Tags