KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > web > wizards > DeployDataExtraPanel


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.web.wizards;
21
22 import java.awt.GridBagConstraints JavaDoc;
23 import java.awt.Insets JavaDoc;
24
25 import javax.swing.JLabel JavaDoc;
26 import javax.swing.JPanel JavaDoc;
27
28 import org.openide.util.NbBundle;
29 import org.openide.util.HelpCtx;
30
31 /* Wizard panel that collects additional info for Filters
32  *
33  * @author Ana von Klopp
34  */

35
36 class DeployDataExtraPanel extends BaseWizardPanel {
37
38     private ServletData deployData;
39     private JLabel JavaDoc jLinstruction;
40     private InitParamPanel paramPanel;
41
42     private static final long serialVersionUID = -2720213209076965116L;
43
44     DeployDataExtraPanel(TargetEvaluator evaluator) {
45
46     deployData = (ServletData)(evaluator.getDeployData());
47     setName(NbBundle.getMessage(DeployDataExtraPanel.class,
48                     "TITLE_ddpanel_filter_2"));
49     getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(DeployDataExtraPanel.class, "ACSD_deployment_2"));
50     initComponents ();
51     fireChangeEvent();
52     }
53
54     private void initComponents () {
55
56     // Layout description
57
setLayout(new java.awt.GridBagLayout JavaDoc());
58     setPreferredSize(new java.awt.Dimension JavaDoc(450, 250));
59
60     // Entity covers entire row
61
GridBagConstraints JavaDoc fullRowC = new GridBagConstraints JavaDoc();
62     fullRowC.gridx = 0;
63     fullRowC.gridy = GridBagConstraints.RELATIVE;
64     fullRowC.gridwidth = 10;
65     fullRowC.weightx = 1.0;
66     fullRowC.anchor = GridBagConstraints.WEST;
67     fullRowC.fill = GridBagConstraints.HORIZONTAL;
68     fullRowC.insets = new Insets JavaDoc(4, 0, 4, 60);
69
70     // Table panel
71
GridBagConstraints JavaDoc tablePanelC = new GridBagConstraints JavaDoc();
72     tablePanelC.gridx = 0;
73     tablePanelC.gridy = GridBagConstraints.RELATIVE;
74     tablePanelC.gridheight = 5;
75     tablePanelC.gridwidth = 10;
76     tablePanelC.fill = GridBagConstraints.BOTH;
77     tablePanelC.weightx = 1.0;
78     //tablePanelC.weighty = 1.0;
79
tablePanelC.anchor = GridBagConstraints.WEST;
80     tablePanelC.insets = new Insets JavaDoc(4, 0, 4, 0);
81
82     // Filler
83
GridBagConstraints JavaDoc fillerC = new GridBagConstraints JavaDoc();
84     fillerC.gridx = 0;
85     fillerC.weighty = 1.0;
86     fillerC.gridy = GridBagConstraints.RELATIVE;
87     fillerC.fill = GridBagConstraints.HORIZONTAL;
88
89     // Component Initialization by row
90
// 1. Instruction
91
jLinstruction = new JLabel JavaDoc(NbBundle.getMessage(DeployDataExtraPanel.class, "LBL_dd_filter_2"));
92     this.add(jLinstruction, fullRowC);
93
94     // 2. Init param table
95
paramPanel = new InitParamPanel(deployData, this);
96     this.add(paramPanel, tablePanelC);
97
98     // 3. Add vertical filler at the bottom
99
JPanel JavaDoc filler2 = new JPanel JavaDoc ();
100     this.add(filler2, fillerC);
101     }
102
103     public void setData() {
104     jLinstruction.setEnabled(deployData.makeEntry());
105     paramPanel.setEnabled(deployData.makeEntry());
106     }
107
108     public void log(String JavaDoc s) {
109     System.out.println("DeployDataExtraPanel" + s); //NOI18N
110
}
111
112     public HelpCtx getHelp() {
113         return new HelpCtx(DeployDataExtraPanel.class);
114     }
115 }
116
117
118
Popular Tags