Lines 19-31
Link Here
|
19 |
|
19 |
|
20 |
package org.netbeans.modules.java.j2seproject.ui.customizer; |
20 |
package org.netbeans.modules.java.j2seproject.ui.customizer; |
21 |
|
21 |
|
|
|
22 |
import java.awt.Component; |
23 |
import java.awt.event.ActionEvent; |
24 |
import java.awt.event.ActionListener; |
22 |
import java.io.File; |
25 |
import java.io.File; |
|
|
26 |
import java.nio.charset.Charset; |
27 |
import java.nio.charset.Charset; |
28 |
import java.nio.charset.CharsetDecoder; |
29 |
import java.nio.charset.CharsetEncoder; |
30 |
import javax.swing.DefaultComboBoxModel; |
31 |
import javax.swing.DefaultListCellRenderer; |
32 |
import javax.swing.JList; |
23 |
import javax.swing.event.ListDataEvent; |
33 |
import javax.swing.event.ListDataEvent; |
24 |
import javax.swing.event.ListDataListener; |
34 |
import javax.swing.event.ListDataListener; |
|
|
35 |
import org.netbeans.api.queries.FileEncodingQuery; |
25 |
import org.openide.filesystems.FileObject; |
36 |
import org.openide.filesystems.FileObject; |
26 |
import org.openide.filesystems.FileUtil; |
37 |
import org.openide.filesystems.FileUtil; |
27 |
import org.openide.util.HelpCtx; |
38 |
import org.openide.util.HelpCtx; |
28 |
import org.openide.util.NbBundle; |
|
|
29 |
import org.netbeans.modules.java.j2seproject.J2SEProject; |
39 |
import org.netbeans.modules.java.j2seproject.J2SEProject; |
30 |
|
40 |
|
31 |
/** |
41 |
/** |
Lines 33-38
Link Here
|
33 |
* @author Tomas Zezula |
43 |
* @author Tomas Zezula |
34 |
*/ |
44 |
*/ |
35 |
public class CustomizerSources extends javax.swing.JPanel implements HelpCtx.Provider { |
45 |
public class CustomizerSources extends javax.swing.JPanel implements HelpCtx.Provider { |
|
|
46 |
|
47 |
|
48 |
private J2SEProjectProperties uiProperties; |
49 |
private String originalEncoding; |
36 |
|
50 |
|
37 |
public CustomizerSources( J2SEProjectProperties uiProperties ) { |
51 |
public CustomizerSources( J2SEProjectProperties uiProperties ) { |
38 |
initComponents(); |
52 |
initComponents(); |
Lines 86-91
Link Here
|
86 |
} |
100 |
} |
87 |
}); |
101 |
}); |
88 |
enableSourceLevel (); |
102 |
enableSourceLevel (); |
|
|
103 |
this.uiProperties = uiProperties; |
104 |
this.originalEncoding = this.uiProperties.getProject().evaluator().getProperty(J2SEProjectProperties.PROJECT_ENCODING); |
105 |
if (this.originalEncoding == null) { |
106 |
this.originalEncoding = FileEncodingQuery.getDefaultEncoding().name(); |
107 |
} |
108 |
|
109 |
this.encoding.setModel(new EncodingModel(this.originalEncoding)); |
110 |
this.encoding.setRenderer(new EncodingRenderer()); |
111 |
|
112 |
|
113 |
this.encoding.addActionListener(new ActionListener () { |
114 |
public void actionPerformed(ActionEvent arg0) { |
115 |
handleEncodingChange(); |
116 |
} |
117 |
}); |
118 |
} |
119 |
|
120 |
|
121 |
private void handleEncodingChange () { |
122 |
Charset enc = (Charset) encoding.getSelectedItem(); |
123 |
String encName; |
124 |
if (enc != null) { |
125 |
encName = enc.name(); |
126 |
} |
127 |
else { |
128 |
encName = originalEncoding; |
129 |
} |
130 |
this.uiProperties.putAdditionalProperty(J2SEProjectProperties.PROJECT_ENCODING, encName); |
89 |
} |
131 |
} |
90 |
|
132 |
|
91 |
public HelpCtx getHelpCtx() { |
133 |
public HelpCtx getHelpCtx() { |
Lines 96-101
Link Here
|
96 |
this.sourceLevel.setEnabled(sourceLevel.getItemCount()>0); |
138 |
this.sourceLevel.setEnabled(sourceLevel.getItemCount()>0); |
97 |
} |
139 |
} |
98 |
|
140 |
|
|
|
141 |
|
142 |
private static class EncodingRenderer extends DefaultListCellRenderer { |
143 |
|
144 |
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { |
145 |
assert value instanceof Charset; |
146 |
return super.getListCellRendererComponent(list, ((Charset)value).displayName(), index, isSelected, cellHasFocus); |
147 |
} |
148 |
} |
149 |
|
150 |
private static class EncodingModel extends DefaultComboBoxModel { |
151 |
|
152 |
public EncodingModel (String originalEncoding) { |
153 |
Charset defEnc = null; |
154 |
for (Charset c : Charset.availableCharsets().values()) { |
155 |
if (c.name().equals(originalEncoding)) { |
156 |
defEnc = c; |
157 |
} |
158 |
addElement(c); |
159 |
} |
160 |
if (defEnc == null) { |
161 |
//Create artificial Charset to keep the original value |
162 |
//May happen when the project was set up on the platform |
163 |
//which supports more encodings |
164 |
defEnc = new UnknownCharset (originalEncoding); |
165 |
addElement(defEnc); |
166 |
} |
167 |
setSelectedItem(defEnc); |
168 |
} |
169 |
} |
170 |
|
171 |
private static class UnknownCharset extends Charset { |
172 |
|
173 |
UnknownCharset (String name) { |
174 |
super (name, new String[0]); |
175 |
} |
176 |
|
177 |
public boolean contains(Charset c) { |
178 |
throw new UnsupportedOperationException(); |
179 |
} |
180 |
|
181 |
public CharsetDecoder newDecoder() { |
182 |
throw new UnsupportedOperationException(); |
183 |
} |
184 |
|
185 |
public CharsetEncoder newEncoder() { |
186 |
throw new UnsupportedOperationException(); |
187 |
} |
188 |
} |
189 |
|
99 |
/** This method is called from within the constructor to |
190 |
/** This method is called from within the constructor to |
100 |
* initialize the form. |
191 |
* initialize the form. |
101 |
* WARNING: Do NOT modify this code. The content of this method is |
192 |
* WARNING: Do NOT modify this code. The content of this method is |
Lines 127-138
Link Here
|
127 |
jLabel4 = new javax.swing.JLabel(); |
218 |
jLabel4 = new javax.swing.JLabel(); |
128 |
sourceLevel = new javax.swing.JComboBox(); |
219 |
sourceLevel = new javax.swing.JComboBox(); |
129 |
jPanel2 = new javax.swing.JPanel(); |
220 |
jPanel2 = new javax.swing.JPanel(); |
|
|
221 |
jLabel5 = new javax.swing.JLabel(); |
222 |
encoding = new javax.swing.JComboBox(); |
130 |
|
223 |
|
131 |
setLayout(new java.awt.GridBagLayout()); |
224 |
setLayout(new java.awt.GridBagLayout()); |
132 |
|
225 |
|
133 |
jLabel1.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_ProjectFolder").charAt(0)); |
226 |
jLabel1.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_ProjectFolder").charAt(0)); |
134 |
jLabel1.setLabelFor(projectLocation); |
227 |
jLabel1.setLabelFor(projectLocation); |
135 |
jLabel1.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("CTL_ProjectFolder")); |
228 |
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle"); // NOI18N |
|
|
229 |
jLabel1.setText(bundle.getString("CTL_ProjectFolder")); // NOI18N |
136 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
230 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
137 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
231 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
138 |
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12); |
232 |
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12); |
Lines 145-157
Link Here
|
145 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
239 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
146 |
gridBagConstraints.weightx = 1.0; |
240 |
gridBagConstraints.weightx = 1.0; |
147 |
add(projectLocation, gridBagConstraints); |
241 |
add(projectLocation, gridBagConstraints); |
148 |
projectLocation.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("AD_CustomizerSources_projectLocation")); |
242 |
projectLocation.getAccessibleContext().setAccessibleDescription(bundle.getString("AD_CustomizerSources_projectLocation")); // NOI18N |
149 |
|
243 |
|
150 |
sourceRootsPanel.setLayout(new java.awt.GridBagLayout()); |
244 |
sourceRootsPanel.setLayout(new java.awt.GridBagLayout()); |
151 |
|
245 |
|
152 |
jLabel2.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_SourceRoots").charAt(0)); |
246 |
jLabel2.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_SourceRoots").charAt(0)); |
153 |
jLabel2.setLabelFor(sourceRoots); |
247 |
jLabel2.setLabelFor(sourceRoots); |
154 |
jLabel2.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("CTL_SourceRoots")); |
248 |
jLabel2.setText(bundle.getString("CTL_SourceRoots")); // NOI18N |
155 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
249 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
156 |
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; |
250 |
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; |
157 |
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
251 |
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
Lines 186-192
Link Here
|
186 |
} |
280 |
} |
187 |
}); |
281 |
}); |
188 |
jScrollPane1.setViewportView(sourceRoots); |
282 |
jScrollPane1.setViewportView(sourceRoots); |
189 |
sourceRoots.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("AD_CustomizerSources_sourceRoots")); |
283 |
sourceRoots.getAccessibleContext().setAccessibleDescription(bundle.getString("AD_CustomizerSources_sourceRoots")); // NOI18N |
190 |
|
284 |
|
191 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
285 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
192 |
gridBagConstraints.gridx = 0; |
286 |
gridBagConstraints.gridx = 0; |
Lines 200-206
Link Here
|
200 |
sourceRootsPanel.add(jScrollPane1, gridBagConstraints); |
294 |
sourceRootsPanel.add(jScrollPane1, gridBagConstraints); |
201 |
|
295 |
|
202 |
addSourceRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_AddSourceRoot").charAt(0)); |
296 |
addSourceRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_AddSourceRoot").charAt(0)); |
203 |
addSourceRoot.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("CTL_AddSourceRoot")); |
297 |
addSourceRoot.setText(bundle.getString("CTL_AddSourceRoot")); // NOI18N |
204 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
298 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
205 |
gridBagConstraints.gridx = 1; |
299 |
gridBagConstraints.gridx = 1; |
206 |
gridBagConstraints.gridy = 1; |
300 |
gridBagConstraints.gridy = 1; |
Lines 208-217
Link Here
|
208 |
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
302 |
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
209 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
303 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
210 |
sourceRootsPanel.add(addSourceRoot, gridBagConstraints); |
304 |
sourceRootsPanel.add(addSourceRoot, gridBagConstraints); |
211 |
addSourceRoot.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("AD_CustomizerSources_addSourceRoot")); |
305 |
addSourceRoot.getAccessibleContext().setAccessibleDescription(bundle.getString("AD_CustomizerSources_addSourceRoot")); // NOI18N |
212 |
|
306 |
|
213 |
removeSourceRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_RemoveSourceRoot").charAt(0)); |
307 |
removeSourceRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_RemoveSourceRoot").charAt(0)); |
214 |
removeSourceRoot.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("CTL_RemoveSourceRoot")); |
308 |
removeSourceRoot.setText(bundle.getString("CTL_RemoveSourceRoot")); // NOI18N |
215 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
309 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
216 |
gridBagConstraints.gridx = 1; |
310 |
gridBagConstraints.gridx = 1; |
217 |
gridBagConstraints.gridy = 2; |
311 |
gridBagConstraints.gridy = 2; |
Lines 220-229
Link Here
|
220 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
314 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
221 |
gridBagConstraints.insets = new java.awt.Insets(6, 0, 0, 0); |
315 |
gridBagConstraints.insets = new java.awt.Insets(6, 0, 0, 0); |
222 |
sourceRootsPanel.add(removeSourceRoot, gridBagConstraints); |
316 |
sourceRootsPanel.add(removeSourceRoot, gridBagConstraints); |
223 |
removeSourceRoot.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("AD_CustomizerSources_removeSourceRoot")); |
317 |
removeSourceRoot.getAccessibleContext().setAccessibleDescription(bundle.getString("AD_CustomizerSources_removeSourceRoot")); // NOI18N |
224 |
|
318 |
|
225 |
upSourceRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_UpSourceRoot").charAt(0)); |
319 |
upSourceRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_UpSourceRoot").charAt(0)); |
226 |
upSourceRoot.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("CTL_UpSourceRoot")); |
320 |
upSourceRoot.setText(bundle.getString("CTL_UpSourceRoot")); // NOI18N |
227 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
321 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
228 |
gridBagConstraints.gridx = 1; |
322 |
gridBagConstraints.gridx = 1; |
229 |
gridBagConstraints.gridy = 3; |
323 |
gridBagConstraints.gridy = 3; |
Lines 232-241
Link Here
|
232 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
326 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
233 |
gridBagConstraints.insets = new java.awt.Insets(12, 0, 0, 0); |
327 |
gridBagConstraints.insets = new java.awt.Insets(12, 0, 0, 0); |
234 |
sourceRootsPanel.add(upSourceRoot, gridBagConstraints); |
328 |
sourceRootsPanel.add(upSourceRoot, gridBagConstraints); |
235 |
upSourceRoot.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("AD_CustomizerSources_upSourceRoot")); |
329 |
upSourceRoot.getAccessibleContext().setAccessibleDescription(bundle.getString("AD_CustomizerSources_upSourceRoot")); // NOI18N |
236 |
|
330 |
|
237 |
downSourceRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_DownSourceRoot").charAt(0)); |
331 |
downSourceRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_DownSourceRoot").charAt(0)); |
238 |
downSourceRoot.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("CTL_DownSourceRoot")); |
332 |
downSourceRoot.setText(bundle.getString("CTL_DownSourceRoot")); // NOI18N |
239 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
333 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
240 |
gridBagConstraints.gridx = 1; |
334 |
gridBagConstraints.gridx = 1; |
241 |
gridBagConstraints.gridy = 4; |
335 |
gridBagConstraints.gridy = 4; |
Lines 244-250
Link Here
|
244 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
338 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
245 |
gridBagConstraints.insets = new java.awt.Insets(6, 0, 0, 0); |
339 |
gridBagConstraints.insets = new java.awt.Insets(6, 0, 0, 0); |
246 |
sourceRootsPanel.add(downSourceRoot, gridBagConstraints); |
340 |
sourceRootsPanel.add(downSourceRoot, gridBagConstraints); |
247 |
downSourceRoot.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("AD_CustomizerSources_downSourceRoot")); |
341 |
downSourceRoot.getAccessibleContext().setAccessibleDescription(bundle.getString("AD_CustomizerSources_downSourceRoot")); // NOI18N |
248 |
|
342 |
|
249 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
343 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
250 |
gridBagConstraints.gridx = 0; |
344 |
gridBagConstraints.gridx = 0; |
Lines 260-266
Link Here
|
260 |
|
354 |
|
261 |
jLabel3.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_TestRoots").charAt(0)); |
355 |
jLabel3.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_TestRoots").charAt(0)); |
262 |
jLabel3.setLabelFor(testRoots); |
356 |
jLabel3.setLabelFor(testRoots); |
263 |
jLabel3.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("CTL_TestRoots")); |
357 |
jLabel3.setText(bundle.getString("CTL_TestRoots")); // NOI18N |
264 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
358 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
265 |
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; |
359 |
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; |
266 |
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
360 |
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
Lines 296-302
Link Here
|
296 |
} |
390 |
} |
297 |
}); |
391 |
}); |
298 |
jScrollPane2.setViewportView(testRoots); |
392 |
jScrollPane2.setViewportView(testRoots); |
299 |
testRoots.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("AD_CustomizerSources_testRoots")); |
393 |
testRoots.getAccessibleContext().setAccessibleDescription(bundle.getString("AD_CustomizerSources_testRoots")); // NOI18N |
300 |
|
394 |
|
301 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
395 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
302 |
gridBagConstraints.gridx = 0; |
396 |
gridBagConstraints.gridx = 0; |
Lines 309-315
Link Here
|
309 |
testRootsPanel.add(jScrollPane2, gridBagConstraints); |
403 |
testRootsPanel.add(jScrollPane2, gridBagConstraints); |
310 |
|
404 |
|
311 |
addTestRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_AddTestRoot").charAt(0)); |
405 |
addTestRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_AddTestRoot").charAt(0)); |
312 |
addTestRoot.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("CTL_AddTestRoot")); |
406 |
addTestRoot.setText(bundle.getString("CTL_AddTestRoot")); // NOI18N |
313 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
407 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
314 |
gridBagConstraints.gridx = 1; |
408 |
gridBagConstraints.gridx = 1; |
315 |
gridBagConstraints.gridy = 1; |
409 |
gridBagConstraints.gridy = 1; |
Lines 318-327
Link Here
|
318 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
412 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
319 |
gridBagConstraints.insets = new java.awt.Insets(0, 12, 6, 0); |
413 |
gridBagConstraints.insets = new java.awt.Insets(0, 12, 6, 0); |
320 |
testRootsPanel.add(addTestRoot, gridBagConstraints); |
414 |
testRootsPanel.add(addTestRoot, gridBagConstraints); |
321 |
addTestRoot.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("AD_CustomizerSources_addTestRoot")); |
415 |
addTestRoot.getAccessibleContext().setAccessibleDescription(bundle.getString("AD_CustomizerSources_addTestRoot")); // NOI18N |
322 |
|
416 |
|
323 |
removeTestRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_RemoveTestRoot").charAt(0)); |
417 |
removeTestRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_RemoveTestRoot").charAt(0)); |
324 |
removeTestRoot.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("CTL_RemoveTestRoot")); |
418 |
removeTestRoot.setText(bundle.getString("CTL_RemoveTestRoot")); // NOI18N |
325 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
419 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
326 |
gridBagConstraints.gridx = 1; |
420 |
gridBagConstraints.gridx = 1; |
327 |
gridBagConstraints.gridy = 2; |
421 |
gridBagConstraints.gridy = 2; |
Lines 330-339
Link Here
|
330 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
424 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
331 |
gridBagConstraints.insets = new java.awt.Insets(0, 12, 12, 0); |
425 |
gridBagConstraints.insets = new java.awt.Insets(0, 12, 12, 0); |
332 |
testRootsPanel.add(removeTestRoot, gridBagConstraints); |
426 |
testRootsPanel.add(removeTestRoot, gridBagConstraints); |
333 |
removeTestRoot.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("AD_CustomizerSources_removeTestRoot")); |
427 |
removeTestRoot.getAccessibleContext().setAccessibleDescription(bundle.getString("AD_CustomizerSources_removeTestRoot")); // NOI18N |
334 |
|
428 |
|
335 |
upTestRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_UpTestRoot").charAt(0)); |
429 |
upTestRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_UpTestRoot").charAt(0)); |
336 |
upTestRoot.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("CTL_UpTestRoot")); |
430 |
upTestRoot.setText(bundle.getString("CTL_UpTestRoot")); // NOI18N |
337 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
431 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
338 |
gridBagConstraints.gridx = 1; |
432 |
gridBagConstraints.gridx = 1; |
339 |
gridBagConstraints.gridy = 3; |
433 |
gridBagConstraints.gridy = 3; |
Lines 342-351
Link Here
|
342 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
436 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
343 |
gridBagConstraints.insets = new java.awt.Insets(0, 12, 6, 0); |
437 |
gridBagConstraints.insets = new java.awt.Insets(0, 12, 6, 0); |
344 |
testRootsPanel.add(upTestRoot, gridBagConstraints); |
438 |
testRootsPanel.add(upTestRoot, gridBagConstraints); |
345 |
upTestRoot.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("AD_CustomizerSources_upTestRoot")); |
439 |
upTestRoot.getAccessibleContext().setAccessibleDescription(bundle.getString("AD_CustomizerSources_upTestRoot")); // NOI18N |
346 |
|
440 |
|
347 |
downTestRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_DownTestRoot").charAt(0)); |
441 |
downTestRoot.setMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_DownTestRoot").charAt(0)); |
348 |
downTestRoot.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("CTL_DownTestRoot")); |
442 |
downTestRoot.setText(bundle.getString("CTL_DownTestRoot")); // NOI18N |
349 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
443 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
350 |
gridBagConstraints.gridx = 1; |
444 |
gridBagConstraints.gridx = 1; |
351 |
gridBagConstraints.gridy = 4; |
445 |
gridBagConstraints.gridy = 4; |
Lines 354-360
Link Here
|
354 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
448 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
355 |
gridBagConstraints.insets = new java.awt.Insets(0, 12, 0, 0); |
449 |
gridBagConstraints.insets = new java.awt.Insets(0, 12, 0, 0); |
356 |
testRootsPanel.add(downTestRoot, gridBagConstraints); |
450 |
testRootsPanel.add(downTestRoot, gridBagConstraints); |
357 |
downTestRoot.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("AD_CustomizerSources_downTestRoot")); |
451 |
downTestRoot.getAccessibleContext().setAccessibleDescription(bundle.getString("AD_CustomizerSources_downTestRoot")); // NOI18N |
358 |
|
452 |
|
359 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
453 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
360 |
gridBagConstraints.gridx = 0; |
454 |
gridBagConstraints.gridx = 0; |
Lines 371-401
Link Here
|
371 |
|
465 |
|
372 |
jLabel4.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_SourceLevel").charAt(0)); |
466 |
jLabel4.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("MNE_SourceLevel").charAt(0)); |
373 |
jLabel4.setLabelFor(sourceLevel); |
467 |
jLabel4.setLabelFor(sourceLevel); |
374 |
jLabel4.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("TXT_SourceLevel")); |
468 |
jLabel4.setText(bundle.getString("TXT_SourceLevel")); // NOI18N |
375 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
469 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
376 |
gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; |
|
|
377 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; |
470 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; |
378 |
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12); |
471 |
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12); |
379 |
jPanel1.add(jLabel4, gridBagConstraints); |
472 |
jPanel1.add(jLabel4, gridBagConstraints); |
380 |
|
473 |
|
381 |
sourceLevel.setMinimumSize(this.sourceLevel.getPreferredSize()); |
474 |
sourceLevel.setMinimumSize(this.sourceLevel.getPreferredSize()); |
382 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
475 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
383 |
gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; |
|
|
384 |
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
476 |
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
385 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
477 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
386 |
gridBagConstraints.weightx = 0.75; |
478 |
gridBagConstraints.weightx = 0.75; |
387 |
jPanel1.add(sourceLevel, gridBagConstraints); |
479 |
jPanel1.add(sourceLevel, gridBagConstraints); |
388 |
sourceLevel.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("AN_SourceLevel")); |
480 |
sourceLevel.getAccessibleContext().setAccessibleName(bundle.getString("AN_SourceLevel")); // NOI18N |
389 |
sourceLevel.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("AD_SourceLevel")); |
481 |
sourceLevel.getAccessibleContext().setAccessibleDescription(bundle.getString("AD_SourceLevel")); // NOI18N |
390 |
|
482 |
|
391 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
483 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
392 |
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; |
484 |
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; |
393 |
gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; |
|
|
394 |
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; |
485 |
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; |
395 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
486 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
396 |
gridBagConstraints.weightx = 1.0; |
487 |
gridBagConstraints.weightx = 1.0; |
397 |
jPanel1.add(jPanel2, gridBagConstraints); |
488 |
jPanel1.add(jPanel2, gridBagConstraints); |
398 |
|
489 |
|
|
|
490 |
jLabel5.setLabelFor(encoding); |
491 |
org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(CustomizerSources.class, "TXT_Encoding")); // NOI18N |
492 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
493 |
gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; |
494 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; |
495 |
gridBagConstraints.insets = new java.awt.Insets(12, 0, 0, 12); |
496 |
jPanel1.add(jLabel5, gridBagConstraints); |
497 |
|
498 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
499 |
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
500 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; |
501 |
gridBagConstraints.insets = new java.awt.Insets(12, 0, 0, 0); |
502 |
jPanel1.add(encoding, gridBagConstraints); |
503 |
|
399 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
504 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
400 |
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; |
505 |
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; |
401 |
gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; |
506 |
gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; |
Lines 403-409
Link Here
|
403 |
gridBagConstraints.weightx = 1.0; |
508 |
gridBagConstraints.weightx = 1.0; |
404 |
gridBagConstraints.insets = new java.awt.Insets(12, 0, 0, 0); |
509 |
gridBagConstraints.insets = new java.awt.Insets(12, 0, 0, 0); |
405 |
add(jPanel1, gridBagConstraints); |
510 |
add(jPanel1, gridBagConstraints); |
406 |
|
|
|
407 |
}// </editor-fold>//GEN-END:initComponents |
511 |
}// </editor-fold>//GEN-END:initComponents |
408 |
|
512 |
|
409 |
|
513 |
|
Lines 412-421
Link Here
|
412 |
private javax.swing.JButton addTestRoot; |
516 |
private javax.swing.JButton addTestRoot; |
413 |
private javax.swing.JButton downSourceRoot; |
517 |
private javax.swing.JButton downSourceRoot; |
414 |
private javax.swing.JButton downTestRoot; |
518 |
private javax.swing.JButton downTestRoot; |
|
|
519 |
private javax.swing.JComboBox encoding; |
415 |
private javax.swing.JLabel jLabel1; |
520 |
private javax.swing.JLabel jLabel1; |
416 |
private javax.swing.JLabel jLabel2; |
521 |
private javax.swing.JLabel jLabel2; |
417 |
private javax.swing.JLabel jLabel3; |
522 |
private javax.swing.JLabel jLabel3; |
418 |
private javax.swing.JLabel jLabel4; |
523 |
private javax.swing.JLabel jLabel4; |
|
|
524 |
private javax.swing.JLabel jLabel5; |
419 |
private javax.swing.JPanel jPanel1; |
525 |
private javax.swing.JPanel jPanel1; |
420 |
private javax.swing.JPanel jPanel2; |
526 |
private javax.swing.JPanel jPanel2; |
421 |
private javax.swing.JScrollPane jScrollPane1; |
527 |
private javax.swing.JScrollPane jScrollPane1; |