KickJava   Java API By Example, From Geeks To Geeks.

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


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 SessionOverviewForm extends SectionNodeInnerPanel {
32
33     static final String JavaDoc SESSION_TYPE_STATELESS="Stateless"; //NOI18N
34
static final String JavaDoc SESSION_TYPE_STATEFUL="Stateful"; //NOI18N
35
static final String JavaDoc TRANSACTION_TYPE_BEAN="Bean"; //NOI18N
36
static final String JavaDoc TRANSACTION_TYPE_CONTAINER="Container"; //NOI18N
37

38     /**
39      * Creates new form SessionOverviewForm
40      */

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

56     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
57
private void initComponents() {
58         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
59
60         sessionTypeButtonGroup = new javax.swing.ButtonGroup JavaDoc();
61         transactionTypeButtonGroup = new javax.swing.ButtonGroup JavaDoc();
62         sessionUnmatchedRadioButton = new javax.swing.JRadioButton JavaDoc();
63         transactionUnmatchedRadioButton = new javax.swing.JRadioButton JavaDoc();
64         nameLabel = new javax.swing.JLabel JavaDoc();
65         ejbNameTextField = new javax.swing.JTextField JavaDoc();
66         sessionTypeLabel = new javax.swing.JLabel JavaDoc();
67         statelessRadioButton = new javax.swing.JRadioButton JavaDoc();
68         statefulRadioButton = new javax.swing.JRadioButton JavaDoc();
69         beanRadioButton = new javax.swing.JRadioButton JavaDoc();
70         containerRadioButton = new javax.swing.JRadioButton JavaDoc();
71         transactionTypeLabel = new javax.swing.JLabel JavaDoc();
72         layoutHelperLabel = new javax.swing.JLabel JavaDoc();
73
74         sessionTypeButtonGroup.add(sessionUnmatchedRadioButton);
75         sessionUnmatchedRadioButton.setText("null");
76         transactionTypeButtonGroup.add(transactionUnmatchedRadioButton);
77         transactionUnmatchedRadioButton.setSelected(true);
78         transactionUnmatchedRadioButton.setText("null");
79
80         setLayout(new java.awt.GridBagLayout JavaDoc());
81
82         nameLabel.setText(org.openide.util.NbBundle.getMessage(SessionOverviewForm.class, "LBL_EjbName"));
83         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
84         gridBagConstraints.gridx = 0;
85         gridBagConstraints.gridy = 0;
86         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
87         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 3, 3);
88         add(nameLabel, gridBagConstraints);
89
90         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
91         gridBagConstraints.gridx = 1;
92         gridBagConstraints.gridy = 0;
93         gridBagConstraints.gridwidth = 2;
94         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
95         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 3, 3);
96         add(ejbNameTextField, gridBagConstraints);
97
98         sessionTypeLabel.setText(org.openide.util.NbBundle.getMessage(SessionOverviewForm.class, "LBL_SessionType"));
99         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
100         gridBagConstraints.gridx = 0;
101         gridBagConstraints.gridy = 1;
102         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
103         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 3, 3);
104         add(sessionTypeLabel, gridBagConstraints);
105
106         sessionTypeButtonGroup.add(statelessRadioButton);
107         statelessRadioButton.setText(org.openide.util.NbBundle.getMessage(SessionOverviewForm.class, "LBL_Stateless"));
108         statelessRadioButton.setOpaque(false);
109         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
110         gridBagConstraints.gridx = 1;
111         gridBagConstraints.gridy = 1;
112         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
113         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 3, 3);
114         add(statelessRadioButton, gridBagConstraints);
115
116         sessionTypeButtonGroup.add(statefulRadioButton);
117         statefulRadioButton.setText(org.openide.util.NbBundle.getMessage(SessionOverviewForm.class, "LBL_Stateful"));
118         statefulRadioButton.setOpaque(false);
119         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
120         gridBagConstraints.gridx = 2;
121         gridBagConstraints.gridy = 1;
122         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
123         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 3, 3);
124         add(statefulRadioButton, gridBagConstraints);
125
126         transactionTypeButtonGroup.add(beanRadioButton);
127         beanRadioButton.setText(org.openide.util.NbBundle.getMessage(SessionOverviewForm.class, "LBL_Bean"));
128         beanRadioButton.setOpaque(false);
129         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
130         gridBagConstraints.gridx = 1;
131         gridBagConstraints.gridy = 2;
132         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
133         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 3, 3);
134         add(beanRadioButton, gridBagConstraints);
135
136         transactionTypeButtonGroup.add(containerRadioButton);
137         containerRadioButton.setText(org.openide.util.NbBundle.getMessage(SessionOverviewForm.class, "LBL_Container"));
138         containerRadioButton.setOpaque(false);
139         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
140         gridBagConstraints.gridx = 2;
141         gridBagConstraints.gridy = 2;
142         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
143         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 3, 3);
144         add(containerRadioButton, gridBagConstraints);
145
146         transactionTypeLabel.setText(org.openide.util.NbBundle.getMessage(SessionOverviewForm.class, "LBL_Transaction_Type"));
147         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
148         gridBagConstraints.gridx = 0;
149         gridBagConstraints.gridy = 2;
150         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
151         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 3, 3);
152         add(transactionTypeLabel, gridBagConstraints);
153
154         layoutHelperLabel.setText(" ");
155         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
156         gridBagConstraints.gridx = 3;
157         gridBagConstraints.gridy = 3;
158         gridBagConstraints.weightx = 1.0;
159         gridBagConstraints.weighty = 1.0;
160         add(layoutHelperLabel, gridBagConstraints);
161
162     }
163     // </editor-fold>//GEN-END:initComponents
164

165     // Variables declaration - do not modify//GEN-BEGIN:variables
166
private javax.swing.JRadioButton JavaDoc beanRadioButton;
167     private javax.swing.JRadioButton JavaDoc containerRadioButton;
168     private javax.swing.JTextField JavaDoc ejbNameTextField;
169     private javax.swing.JLabel JavaDoc layoutHelperLabel;
170     private javax.swing.JLabel JavaDoc nameLabel;
171     private javax.swing.ButtonGroup JavaDoc sessionTypeButtonGroup;
172     private javax.swing.JLabel JavaDoc sessionTypeLabel;
173     private javax.swing.JRadioButton JavaDoc sessionUnmatchedRadioButton;
174     private javax.swing.JRadioButton JavaDoc statefulRadioButton;
175     private javax.swing.JRadioButton JavaDoc statelessRadioButton;
176     private javax.swing.ButtonGroup JavaDoc transactionTypeButtonGroup;
177     private javax.swing.JLabel JavaDoc transactionTypeLabel;
178     private javax.swing.JRadioButton JavaDoc transactionUnmatchedRadioButton;
179     // End of variables declaration//GEN-END:variables
180

181     public JTextField getEjbNameTextField() {
182         return ejbNameTextField;
183     }
184
185     public ButtonGroup getSessionTypeButtonGroup() {
186         return sessionTypeButtonGroup;
187     }
188
189     public ButtonGroup getTransactionTypeButtonGroup() {
190         return transactionTypeButtonGroup;
191     }
192
193     public JComponent getErrorComponent(String JavaDoc errorId) {
194         return null;
195     }
196
197     public void setValue(JComponent source, Object JavaDoc value) {
198
199     }
200
201     public void linkButtonPressed(Object JavaDoc ddBean, String JavaDoc ddProperty) {
202
203     }
204 }
205
Popular Tags