KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > ejbjarproject > ui > wizards > PanelConfigureProjectAppVisual


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.ejbjarproject.ui.wizards;
21
22 import javax.swing.JPanel JavaDoc;
23 import javax.swing.event.DocumentEvent JavaDoc;
24 import javax.swing.event.DocumentListener JavaDoc;
25
26 import org.openide.WizardDescriptor;
27 import org.openide.util.NbBundle;
28
29 public class PanelConfigureProjectAppVisual extends JPanel JavaDoc {
30
31     private PanelConfigureProjectApp panel;
32
33     private PanelProjectAppVisual projectAppPanel;
34 /// private PanelOptionsVisual optionsPanel;
35

36     /** Creates new form PanelInitProject */
37     public PanelConfigureProjectAppVisual(PanelConfigureProjectApp panel) {
38         this.panel = panel;
39         initComponents();
40         this.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(PanelConfigureProjectAppVisual.class, "ACS_NWP1_AppOptionPanel_A11YDesc")); // NOI18N
41

42         projectAppPanel = new PanelProjectAppVisual(panel);
43         locationContainer.add(projectAppPanel, java.awt.BorderLayout.NORTH);
44
45         ///optionsPanel = new PanelOptionsVisual(panel);
46
///optionsContainer.add(optionsPanel, java.awt.BorderLayout.NORTH);
47

48 /// DocumentListener dl = new DocumentListener() {
49
/// public void changedUpdate(DocumentEvent e) {
50
/// setContextPath(e);
51
/// }
52
///
53
/// public void insertUpdate(DocumentEvent e) {
54
/// setContextPath(e);
55
/// }
56
///
57
/// public void removeUpdate(DocumentEvent e) {
58
/// setContextPath(e);
59
/// }
60

61 /// private void setContextPath(DocumentEvent e) {
62
/// if (!optionsPanel.isContextModified())
63
/// optionsPanel.jTextFieldContextPath.setText("/" + projectAppPanel.projectNameTextField.getText().trim().replace(' ', '_'));
64
/// }
65
/// };
66
/// projectAppPanel.projectNameTextField.getDocument().addDocumentListener(dl);
67

68
69         // Provide a name in the title bar.
70
setName(NbBundle.getBundle("org/netbeans/modules/j2ee/ejbjarproject/ui/wizards/Bundle").getString("LBL_NWP1_ProjectAppName")); //NOI18N
71
putClientProperty ("NewProjectWizard_Title", NbBundle.getMessage(PanelConfigureProjectVisual.class, "TXT_NewWebApp")); //NOI18N
72
}
73
74     boolean valid(WizardDescriptor wizardDescriptor) {
75         return projectAppPanel.valid(wizardDescriptor);
76     }
77
78     void read (WizardDescriptor d) {
79         projectAppPanel.read(d);
80 /// optionsPanel.read(d);
81
}
82
83     void store(WizardDescriptor d) {
84         projectAppPanel.store(d);
85 /// optionsPanel.store(d);
86
}
87
88     /** This method is called from within the constructor to
89      * initialize the form.
90      * WARNING: Do NOT modify this code. The content of this method is
91      * always regenerated by the Form Editor.
92      */

93     private void initComponents() {//GEN-BEGIN:initComponents
94
java.awt.GridBagConstraints JavaDoc gridBagConstraints;
95
96         locationContainer = new javax.swing.JPanel JavaDoc();
97
98         setLayout(new java.awt.GridBagLayout JavaDoc());
99
100         setPreferredSize(new java.awt.Dimension JavaDoc(550, 350));
101         setRequestFocusEnabled(false);
102         locationContainer.setLayout(new java.awt.BorderLayout JavaDoc());
103
104         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
105         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
106         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
107         gridBagConstraints.weightx = 1.0;
108         add(locationContainer, gridBagConstraints);
109
110     }//GEN-END:initComponents
111

112     // Variables declaration - do not modify//GEN-BEGIN:variables
113
private javax.swing.JPanel JavaDoc locationContainer;
114     // End of variables declaration//GEN-END:variables
115

116 }
117
Popular Tags