KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > earproject > ui > customizer > CustomizerJavadoc


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.earproject.ui.customizer;
21
22 import javax.swing.JPanel JavaDoc;
23 import org.openide.util.HelpCtx;
24
25 /** Customizer for general project attributes.
26  *
27  * @author phrebejk
28  */

29 public class CustomizerJavadoc extends JPanel JavaDoc implements ArchiveCustomizerPanel, HelpCtx.Provider {
30
31     private VisualPropertySupport vps;
32
33     /** Creates new form CustomizerCompile */
34     public CustomizerJavadoc(EarProjectProperties webProperties) {
35         initComponents();
36
37         vps = new VisualPropertySupport(webProperties);
38     }
39     
40     
41     public void initValues() {
42         vps.register( jCheckBoxPrivate, EarProjectProperties.JAVADOC_PRIVATE );
43         vps.register( jCheckBoxTree, EarProjectProperties.JAVADOC_NO_TREE );
44         vps.register( jCheckBoxUsages, EarProjectProperties.JAVADOC_USE );
45         vps.register( jCheckBoxNavigation, EarProjectProperties.JAVADOC_NO_NAVBAR );
46         vps.register( jCheckBoxIndex, EarProjectProperties.JAVADOC_NO_INDEX );
47         vps.register( jCheckBoxSplitIndex, EarProjectProperties.JAVADOC_SPLIT_INDEX );
48         vps.register( jCheckBoxAuthor, EarProjectProperties.JAVADOC_AUTHOR );
49         vps.register( jCheckBoxVersion, EarProjectProperties.JAVADOC_VERSION );
50         vps.register( jTextFieldWinTitle, EarProjectProperties.JAVADOC_WINDOW_TITLE );
51         // vps.register( jTextFieldEncoding, WebProjectProperties.JAVADOC_ENCODING );
52
vps.register( jCheckBoxPreview, EarProjectProperties.JAVADOC_PREVIEW );
53                 
54         reenableSplitIndex( null );
55         
56         // XXX Temporarily removing some controls
57
remove( jLabelPackage );
58         remove( jTextFieldPackage );
59         remove( jButtonPackage );
60         remove( jCheckBoxSubpackages );
61         jPanel1.remove( jLabelEncoding );
62         jPanel1.remove( jTextFieldEncoding );
63         
64         
65     }
66         
67     
68     /** This method is called from within the constructor to
69      * initialize the form.
70      * WARNING: Do NOT modify this code. The content of this method is
71      * always regenerated by the Form Editor.
72      */

73     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
74
private void initComponents() {
75         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
76
77         jLabelPackage = new javax.swing.JLabel JavaDoc();
78         jTextFieldPackage = new javax.swing.JTextField JavaDoc();
79         jButtonPackage = new javax.swing.JButton JavaDoc();
80         jCheckBoxSubpackages = new javax.swing.JCheckBox JavaDoc();
81         jCheckBoxPrivate = new javax.swing.JCheckBox JavaDoc();
82         jLabelGenerate = new javax.swing.JLabel JavaDoc();
83         jCheckBoxTree = new javax.swing.JCheckBox JavaDoc();
84         jCheckBoxUsages = new javax.swing.JCheckBox JavaDoc();
85         jCheckBoxNavigation = new javax.swing.JCheckBox JavaDoc();
86         jCheckBoxIndex = new javax.swing.JCheckBox JavaDoc();
87         jCheckBoxSplitIndex = new javax.swing.JCheckBox JavaDoc();
88         jLabelTags = new javax.swing.JLabel JavaDoc();
89         jCheckBoxAuthor = new javax.swing.JCheckBox JavaDoc();
90         jCheckBoxVersion = new javax.swing.JCheckBox JavaDoc();
91         jPanel1 = new javax.swing.JPanel JavaDoc();
92         jLabelWinTitle = new javax.swing.JLabel JavaDoc();
93         jTextFieldWinTitle = new javax.swing.JTextField JavaDoc();
94         jLabelEncoding = new javax.swing.JLabel JavaDoc();
95         jTextFieldEncoding = new javax.swing.JTextField JavaDoc();
96         jCheckBoxPreview = new javax.swing.JCheckBox JavaDoc();
97
98         setLayout(new java.awt.GridBagLayout JavaDoc());
99
100         setBorder(new javax.swing.border.CompoundBorder JavaDoc(new javax.swing.border.EtchedBorder JavaDoc(), new javax.swing.border.EmptyBorder JavaDoc(new java.awt.Insets JavaDoc(12, 12, 12, 12))));
101         jLabelPackage.setLabelFor(jTextFieldPackage);
102         org.openide.awt.Mnemonics.setLocalizedText(jLabelPackage, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Package_JLabel"));
103         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
104         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
105         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 12);
106         add(jLabelPackage, gridBagConstraints);
107
108         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
109         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
110         gridBagConstraints.weightx = 1.0;
111         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 6);
112         add(jTextFieldPackage, gridBagConstraints);
113
114         org.openide.awt.Mnemonics.setLocalizedText(jButtonPackage, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Package_JButton"));
115         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
116         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
117         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
118         add(jButtonPackage, gridBagConstraints);
119
120         org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxSubpackages, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Subpackages_JCheckBox"));
121         jCheckBoxSubpackages.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 2));
122         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
123         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
124         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
125         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
126         add(jCheckBoxSubpackages, gridBagConstraints);
127
128         org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxPrivate, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Private_JCheckBox"));
129         jCheckBoxPrivate.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 2));
130         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
131         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
132         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
133         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
134         add(jCheckBoxPrivate, gridBagConstraints);
135
136         org.openide.awt.Mnemonics.setLocalizedText(jLabelGenerate, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Generate_JLabel"));
137         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
138         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
139         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
140         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 2, 0);
141         add(jLabelGenerate, gridBagConstraints);
142
143         org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxTree, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Tree_JCheckBox"));
144         jCheckBoxTree.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 2));
145         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
146         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
147         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
148         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 20, 5, 0);
149         add(jCheckBoxTree, gridBagConstraints);
150
151         org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxUsages, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Usages_JCheckBox"));
152         jCheckBoxUsages.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 2));
153         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
154         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
155         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
156         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 20, 5, 0);
157         add(jCheckBoxUsages, gridBagConstraints);
158
159         org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxNavigation, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Navigation_JCheckBox"));
160         jCheckBoxNavigation.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 2));
161         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
162         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
163         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
164         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 20, 5, 0);
165         add(jCheckBoxNavigation, gridBagConstraints);
166
167         org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxIndex, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Index_JCheckBox"));
168         jCheckBoxIndex.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 2));
169         jCheckBoxIndex.addActionListener(new java.awt.event.ActionListener JavaDoc() {
170             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
171                 reenableSplitIndex(evt);
172             }
173         });
174
175         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
176         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
177         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
178         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 20, 5, 0);
179         add(jCheckBoxIndex, gridBagConstraints);
180
181         org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxSplitIndex, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_SplitIndex_JCheckBox"));
182         jCheckBoxSplitIndex.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 2));
183         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
184         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
185         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
186         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 40, 12, 0);
187         add(jCheckBoxSplitIndex, gridBagConstraints);
188
189         org.openide.awt.Mnemonics.setLocalizedText(jLabelTags, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Tags_JLabel"));
190         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
191         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
192         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
193         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 2, 0);
194         add(jLabelTags, gridBagConstraints);
195
196         org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxAuthor, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Author_JCheckBox"));
197         jCheckBoxAuthor.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 2));
198         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
199         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
200         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
201         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 20, 5, 0);
202         add(jCheckBoxAuthor, gridBagConstraints);
203
204         org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxVersion, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Version_JCheckBox"));
205         jCheckBoxVersion.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 2));
206         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
207         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
208         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
209         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 20, 12, 0);
210         add(jCheckBoxVersion, gridBagConstraints);
211
212         jPanel1.setLayout(new java.awt.GridBagLayout JavaDoc());
213
214         org.openide.awt.Mnemonics.setLocalizedText(jLabelWinTitle, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_WinTitle_JLabel"));
215         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
216         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
217         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 6);
218         jPanel1.add(jLabelWinTitle, gridBagConstraints);
219
220         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
221         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
222         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
223         gridBagConstraints.weightx = 1.0;
224         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
225         jPanel1.add(jTextFieldWinTitle, gridBagConstraints);
226
227         org.openide.awt.Mnemonics.setLocalizedText(jLabelEncoding, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Encoding_JLabel"));
228         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
229         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
230         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 0, 6);
231         jPanel1.add(jLabelEncoding, gridBagConstraints);
232
233         jTextFieldEncoding.setMinimumSize(new java.awt.Dimension JavaDoc(150, 22));
234         jTextFieldEncoding.setPreferredSize(new java.awt.Dimension JavaDoc(150, 22));
235         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
236         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
237         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
238         gridBagConstraints.weightx = 1.0;
239         jPanel1.add(jTextFieldEncoding, gridBagConstraints);
240
241         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
242         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
243         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
244         gridBagConstraints.weightx = 1.0;
245         add(jPanel1, gridBagConstraints);
246
247         org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxPreview, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Preview_JCheckBox"));
248         jCheckBoxPreview.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 2));
249         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
250         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
251         gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
252         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
253         gridBagConstraints.weighty = 1.0;
254         add(jCheckBoxPreview, gridBagConstraints);
255
256     }
257     // </editor-fold>//GEN-END:initComponents
258

259     private void reenableSplitIndex(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_reenableSplitIndex
260
jCheckBoxSplitIndex.setEnabled( jCheckBoxIndex.isSelected() );
261     }//GEN-LAST:event_reenableSplitIndex
262

263     
264     // Variables declaration - do not modify//GEN-BEGIN:variables
265
private javax.swing.JButton JavaDoc jButtonPackage;
266     private javax.swing.JCheckBox JavaDoc jCheckBoxAuthor;
267     private javax.swing.JCheckBox JavaDoc jCheckBoxIndex;
268     private javax.swing.JCheckBox JavaDoc jCheckBoxNavigation;
269     private javax.swing.JCheckBox JavaDoc jCheckBoxPreview;
270     private javax.swing.JCheckBox JavaDoc jCheckBoxPrivate;
271     private javax.swing.JCheckBox JavaDoc jCheckBoxSplitIndex;
272     private javax.swing.JCheckBox JavaDoc jCheckBoxSubpackages;
273     private javax.swing.JCheckBox JavaDoc jCheckBoxTree;
274     private javax.swing.JCheckBox JavaDoc jCheckBoxUsages;
275     private javax.swing.JCheckBox JavaDoc jCheckBoxVersion;
276     private javax.swing.JLabel JavaDoc jLabelEncoding;
277     private javax.swing.JLabel JavaDoc jLabelGenerate;
278     private javax.swing.JLabel JavaDoc jLabelPackage;
279     private javax.swing.JLabel JavaDoc jLabelTags;
280     private javax.swing.JLabel JavaDoc jLabelWinTitle;
281     private javax.swing.JPanel JavaDoc jPanel1;
282     private javax.swing.JTextField JavaDoc jTextFieldEncoding;
283     private javax.swing.JTextField JavaDoc jTextFieldPackage;
284     private javax.swing.JTextField JavaDoc jTextFieldWinTitle;
285     // End of variables declaration//GEN-END:variables
286

287     /** Help context where to find more about the paste type action.
288      * @return the help context for this action
289      */

290     public HelpCtx getHelpCtx() {
291         return new HelpCtx(CustomizerJavadoc.class);
292     }
293
294 }
295
Popular Tags