KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > earproject > ui > wizards > J2eeVersionWarningPanel


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-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.j2ee.earproject.ui.wizards;
21
22 import javax.swing.JPanel JavaDoc;
23 import org.netbeans.api.java.platform.JavaPlatform;
24 import org.netbeans.api.java.platform.JavaPlatformManager;
25 import org.netbeans.api.java.platform.Specification;
26 import org.netbeans.modules.j2ee.deployment.devmodules.api.J2eeModule;
27 import org.netbeans.modules.j2ee.earproject.ui.FoldersListSettings;
28 import org.openide.modules.SpecificationVersion;
29
30 /**
31  * Displays a warning that the project's Java platform will be set to JDK 1.4 or
32  * the source level will be set to 1.4. Similarly for 1.5. See issue #55797.
33  *
34  * @author Andrei Badea
35  */

36 public final class J2eeVersionWarningPanel extends JPanel JavaDoc {
37     
38     /**
39      * Display a warning that the target platform will be downgraded to JDK 1.4
40      */

41     public final static String JavaDoc WARN_SET_JDK_14 = "warnSetJdk14"; // NOI18N
42

43     /**
44      * Display a warning that the target platform will be upgraded to JDK 1.5
45      */

46     public final static String JavaDoc WARN_SET_JDK_15 = "warnSetJdk15"; // NOI18N
47

48     /**
49      * Display a warning that the source level will be downgraded to 1.4
50      */

51     public final static String JavaDoc WARN_SET_SOURCE_LEVEL_14 = "warnSetSourceLevel14"; // NOI18N
52

53     /**
54      * Display a warning that the source level will be upgraded to 1.5
55      */

56     public final static String JavaDoc WARN_SET_SOURCE_LEVEL_15 = "warnSetSourceLevel15"; // NOI18N
57

58     private String JavaDoc warningType;
59     private String JavaDoc javaPlatformName;
60     
61     public J2eeVersionWarningPanel(String JavaDoc warningType) {
62         initComponents();
63         setWarningType(warningType);
64     }
65     
66     public String JavaDoc getWarningType() {
67         return warningType;
68     }
69     
70     public void setWarningType(String JavaDoc warningType) {
71         this.warningType = warningType;
72         
73         setJdk14Panel.setVisible(false);
74         setSourceLevel14Panel.setVisible(false);
75         setJdk15Panel.setVisible(false);
76         setSourceLevel15Panel.setVisible(false);
77         
78         if (WARN_SET_JDK_14.equals(warningType)) {
79             setJdk14Panel.setVisible(true);
80             downgradeJdk14CheckBox.setSelected(FoldersListSettings.getDefault().isAgreedSetJdk14());
81         } else if (WARN_SET_SOURCE_LEVEL_14.equals(warningType)) {
82             setSourceLevel14Panel.setVisible(true);
83             downgradeSourceLevel14CheckBox.setSelected(FoldersListSettings.getDefault().isAgreedSetSourceLevel14());
84         } else if (WARN_SET_JDK_15.equals(warningType)) {
85             setJdk15Panel.setVisible(true);
86             downgradeJdk15CheckBox.setSelected(FoldersListSettings.getDefault().isAgreedSetJdk15());
87         } else if (WARN_SET_SOURCE_LEVEL_15.equals(warningType)) {
88             setSourceLevel15Panel.setVisible(true);
89             downgradeSourceLevel15CheckBox.setSelected(FoldersListSettings.getDefault().isAgreedSetSourceLevel15());
90         }
91     }
92     
93     public boolean getDowngradeAllowed() {
94         if (WARN_SET_JDK_14.equals(warningType)) {
95             return downgradeJdk14CheckBox.isSelected();
96         } else if (WARN_SET_SOURCE_LEVEL_14.equals(warningType)) {
97             return downgradeSourceLevel14CheckBox.isSelected();
98         } else if (WARN_SET_JDK_15.equals(warningType)) {
99             return downgradeJdk15CheckBox.isSelected();
100         } else if (WARN_SET_SOURCE_LEVEL_15.equals(warningType)) {
101             return downgradeSourceLevel15CheckBox.isSelected();
102         } else {
103             return false;
104         }
105     }
106     
107     public String JavaDoc getSuggestedJavaPlatformName() {
108         if (javaPlatformName == null && WARN_SET_JDK_14.equals(warningType) ) {
109             JavaPlatform[] java14Platforms = getJavaPlatforms("1.4");
110             javaPlatformName = java14Platforms[0].getDisplayName();
111         }
112         if (javaPlatformName == null && WARN_SET_JDK_15.equals(warningType) ) {
113             JavaPlatform[] java14Platforms = getJavaPlatforms("1.5");
114             javaPlatformName = java14Platforms[0].getDisplayName();
115         }
116         return javaPlatformName;
117     }
118     
119     public static String JavaDoc findWarningType(String JavaDoc j2eeLevel) {
120         JavaPlatform defaultPlatform = JavaPlatformManager.getDefault().getDefaultPlatform();
121         SpecificationVersion version = defaultPlatform.getSpecification().getVersion();
122         String JavaDoc sourceLevel = version.toString();
123         // #89131: these levels are not actually distinct from 1.5.
124
if (sourceLevel.equals("1.6") || sourceLevel.equals("1.7"))
125             sourceLevel = "1.5";
126         
127         // no warning if 1.4 is the default for j2ee14
128
if (new SpecificationVersion("1.4").equals(version) && j2eeLevel.equals(J2eeModule.J2EE_14)) { // NOI18N
129
return null;
130         }
131         
132         // no warning if 1.5 is the default for j2ee15
133
if ("1.5".equals(sourceLevel) && j2eeLevel.equals(J2eeModule.JAVA_EE_5)) { // NOI18N
134
return null;
135         }
136         
137         if (j2eeLevel.equals(J2eeModule.J2EE_14)) {
138             JavaPlatform[] java14Platforms = getJavaPlatforms("1.4"); //NOI18N
139
if (java14Platforms.length > 0) {
140                 // the user has JDK 1.4, so we warn we'll downgrade to 1.4
141
return WARN_SET_JDK_14;
142             } else {
143                 // no JDK 1.4, the best we can do is downgrade the source level to 1.4
144
return WARN_SET_SOURCE_LEVEL_14;
145             }
146         } else {
147             assert j2eeLevel.equals(J2eeModule.JAVA_EE_5);
148             JavaPlatform[] java15Platforms = getJavaPlatforms("1.5"); //NOI18N
149
if (java15Platforms.length > 0) {
150                 // the user has JDK 1.5, so we warn we'll downgrade to 1.5
151
return WARN_SET_JDK_15;
152             } else {
153                 // no JDK 1.5, the best we can do is downgrade the source level to 1.5
154
return WARN_SET_SOURCE_LEVEL_15;
155             }
156         }
157     }
158     
159     private static JavaPlatform[] getJavaPlatforms(String JavaDoc level) {
160         return JavaPlatformManager.getDefault().getPlatforms(null, new Specification("J2SE", new SpecificationVersion(level))); // NOI18N
161
}
162     
163     /** This method is called from within the constructor to
164      * initialize the form.
165      * WARNING: Do NOT modify this code. The content of this method is
166      * always regenerated by the Form Editor.
167      */

168     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
169
private void initComponents() {
170         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
171
172         setJdk14Panel = new javax.swing.JPanel JavaDoc();
173         warningJdk14TextArea = new javax.swing.JTextArea JavaDoc();
174         downgradeJdk14CheckBox = new javax.swing.JCheckBox JavaDoc();
175         setSourceLevel15Panel = new javax.swing.JPanel JavaDoc();
176         warningSourceLevel15TextArea = new javax.swing.JTextArea JavaDoc();
177         downgradeSourceLevel15CheckBox = new javax.swing.JCheckBox JavaDoc();
178         setJdk15Panel = new javax.swing.JPanel JavaDoc();
179         warningJdk15TextArea = new javax.swing.JTextArea JavaDoc();
180         downgradeJdk15CheckBox = new javax.swing.JCheckBox JavaDoc();
181         setSourceLevel14Panel = new javax.swing.JPanel JavaDoc();
182         warningSourceLevel14TextArea = new javax.swing.JTextArea JavaDoc();
183         downgradeSourceLevel14CheckBox = new javax.swing.JCheckBox JavaDoc();
184
185         setLayout(new java.awt.GridBagLayout JavaDoc());
186
187         setJdk14Panel.setLayout(new java.awt.GridBagLayout JavaDoc());
188
189         warningJdk14TextArea.setEditable(false);
190         warningJdk14TextArea.setLineWrap(true);
191         warningJdk14TextArea.setText(org.openide.util.NbBundle.getBundle(J2eeVersionWarningPanel.class).getString("MSG_RecommendationSetJdk14")); // NOI18N
192
warningJdk14TextArea.setWrapStyleWord(true);
193         warningJdk14TextArea.setOpaque(false);
194         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
195         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
196         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
197         gridBagConstraints.weightx = 1.0;
198         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
199         setJdk14Panel.add(warningJdk14TextArea, gridBagConstraints);
200         warningJdk14TextArea.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSN_Recommendation")); // NOI18N
201
warningJdk14TextArea.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSD_Recommendation")); // NOI18N
202

203         downgradeJdk14CheckBox.setMnemonic(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "MNE_AgreeSetJdk14").charAt(0));
204         downgradeJdk14CheckBox.setSelected(true);
205         downgradeJdk14CheckBox.setText(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "CTL_AgreeSetJdk14")); // NOI18N
206
downgradeJdk14CheckBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
207         downgradeJdk14CheckBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
208             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
209                 downgradeJdk14CheckBoxActionPerformed(evt);
210             }
211         });
212
213         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
214         gridBagConstraints.gridx = 0;
215         gridBagConstraints.gridy = 1;
216         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
217         gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
218         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
219         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
220         gridBagConstraints.weightx = 1.0;
221         gridBagConstraints.weighty = 1.0;
222         setJdk14Panel.add(downgradeJdk14CheckBox, gridBagConstraints);
223         downgradeJdk14CheckBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(J2eeVersionWarningPanel.class).getString("ACS_AgreeSetJdk14")); // NOI18N
224

225         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
226         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
227         gridBagConstraints.weightx = 1.0;
228         gridBagConstraints.weighty = 1.0;
229         add(setJdk14Panel, gridBagConstraints);
230
231         setSourceLevel15Panel.setLayout(new java.awt.GridBagLayout JavaDoc());
232
233         warningSourceLevel15TextArea.setEditable(false);
234         warningSourceLevel15TextArea.setLineWrap(true);
235         warningSourceLevel15TextArea.setText(org.openide.util.NbBundle.getBundle(J2eeVersionWarningPanel.class).getString("MSG_RecommendationSetSourceLevel15")); // NOI18N
236
warningSourceLevel15TextArea.setWrapStyleWord(true);
237         warningSourceLevel15TextArea.setOpaque(false);
238         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
239         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
240         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
241         gridBagConstraints.weightx = 1.0;
242         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
243         setSourceLevel15Panel.add(warningSourceLevel15TextArea, gridBagConstraints);
244         warningSourceLevel15TextArea.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSN_Recommendation")); // NOI18N
245
warningSourceLevel15TextArea.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSD_Recommendation")); // NOI18N
246

247         downgradeSourceLevel15CheckBox.setMnemonic(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "MNE_AgreeSetSourceLevel15").charAt(0));
248         downgradeSourceLevel15CheckBox.setSelected(true);
249         downgradeSourceLevel15CheckBox.setText(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "CTL_AgreeSetSourceLevel15")); // NOI18N
250
downgradeSourceLevel15CheckBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
251         downgradeSourceLevel15CheckBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
252             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
253                 downgradeSourceLevel15CheckBoxActionPerformed(evt);
254             }
255         });
256
257         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
258         gridBagConstraints.gridx = 0;
259         gridBagConstraints.gridy = 1;
260         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
261         gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
262         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
263         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
264         gridBagConstraints.weightx = 1.0;
265         gridBagConstraints.weighty = 1.0;
266         setSourceLevel15Panel.add(downgradeSourceLevel15CheckBox, gridBagConstraints);
267         downgradeSourceLevel15CheckBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(J2eeVersionWarningPanel.class).getString("ACS_AgreeSetSourceLevel15")); // NOI18N
268

269         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
270         gridBagConstraints.gridx = 3;
271         gridBagConstraints.gridy = 0;
272         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
273         gridBagConstraints.weightx = 1.0;
274         gridBagConstraints.weighty = 1.0;
275         add(setSourceLevel15Panel, gridBagConstraints);
276
277         setJdk15Panel.setLayout(new java.awt.GridBagLayout JavaDoc());
278
279         warningJdk15TextArea.setEditable(false);
280         warningJdk15TextArea.setLineWrap(true);
281         warningJdk15TextArea.setText(org.openide.util.NbBundle.getBundle(J2eeVersionWarningPanel.class).getString("MSG_RecommendationSetJdk15")); // NOI18N
282
warningJdk15TextArea.setWrapStyleWord(true);
283         warningJdk15TextArea.setOpaque(false);
284         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
285         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
286         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
287         gridBagConstraints.weightx = 1.0;
288         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
289         setJdk15Panel.add(warningJdk15TextArea, gridBagConstraints);
290         warningJdk15TextArea.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSN_Recommendation")); // NOI18N
291
warningJdk15TextArea.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSD_Recommendation")); // NOI18N
292

293         downgradeJdk15CheckBox.setMnemonic(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "MNE_AgreeSetJdk15").charAt(0));
294         downgradeJdk15CheckBox.setSelected(true);
295         downgradeJdk15CheckBox.setText(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "CTL_AgreeSetJdk15")); // NOI18N
296
downgradeJdk15CheckBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
297         downgradeJdk15CheckBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
298             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
299                 downgradeJdk15CheckBoxActionPerformed(evt);
300             }
301         });
302
303         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
304         gridBagConstraints.gridx = 0;
305         gridBagConstraints.gridy = 1;
306         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
307         gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
308         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
309         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
310         gridBagConstraints.weightx = 1.0;
311         gridBagConstraints.weighty = 1.0;
312         setJdk15Panel.add(downgradeJdk15CheckBox, gridBagConstraints);
313         downgradeJdk15CheckBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(J2eeVersionWarningPanel.class).getString("ACS_AgreeSetJdk15")); // NOI18N
314

315         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
316         gridBagConstraints.gridx = 2;
317         gridBagConstraints.gridy = 0;
318         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
319         gridBagConstraints.weightx = 1.0;
320         gridBagConstraints.weighty = 1.0;
321         add(setJdk15Panel, gridBagConstraints);
322
323         setSourceLevel14Panel.setLayout(new java.awt.GridBagLayout JavaDoc());
324
325         warningSourceLevel14TextArea.setEditable(false);
326         warningSourceLevel14TextArea.setLineWrap(true);
327         warningSourceLevel14TextArea.setText(org.openide.util.NbBundle.getBundle(J2eeVersionWarningPanel.class).getString("MSG_RecommendationSetSourceLevel14")); // NOI18N
328
warningSourceLevel14TextArea.setWrapStyleWord(true);
329         warningSourceLevel14TextArea.setOpaque(false);
330         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
331         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
332         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
333         gridBagConstraints.weightx = 1.0;
334         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
335         setSourceLevel14Panel.add(warningSourceLevel14TextArea, gridBagConstraints);
336         warningSourceLevel14TextArea.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSN_Recommendation")); // NOI18N
337
warningSourceLevel14TextArea.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSD_Recommendation")); // NOI18N
338

339         downgradeSourceLevel14CheckBox.setMnemonic(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "MNE_AgreeSetSourceLevel14").charAt(0));
340         downgradeSourceLevel14CheckBox.setSelected(true);
341         downgradeSourceLevel14CheckBox.setText(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "CTL_AgreeSetSourceLevel14")); // NOI18N
342
downgradeSourceLevel14CheckBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
343         downgradeSourceLevel14CheckBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
344             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
345                 downgradeSourceLevel14CheckBoxActionPerformed(evt);
346             }
347         });
348
349         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
350         gridBagConstraints.gridx = 0;
351         gridBagConstraints.gridy = 1;
352         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
353         gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
354         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
355         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
356         gridBagConstraints.weightx = 1.0;
357         gridBagConstraints.weighty = 1.0;
358         setSourceLevel14Panel.add(downgradeSourceLevel14CheckBox, gridBagConstraints);
359         downgradeSourceLevel14CheckBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(J2eeVersionWarningPanel.class).getString("ACS_AgreeSetSourceLevel14")); // NOI18N
360

361         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
362         gridBagConstraints.gridx = 1;
363         gridBagConstraints.gridy = 0;
364         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
365         gridBagConstraints.weightx = 1.0;
366         gridBagConstraints.weighty = 1.0;
367         add(setSourceLevel14Panel, gridBagConstraints);
368
369     }// </editor-fold>//GEN-END:initComponents
370

371     private void downgradeSourceLevel15CheckBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_downgradeSourceLevel15CheckBoxActionPerformed
372
FoldersListSettings.getDefault().setAgreedSetSourceLevel15(downgradeSourceLevel15CheckBox.isSelected());
373     }//GEN-LAST:event_downgradeSourceLevel15CheckBoxActionPerformed
374

375     private void downgradeJdk15CheckBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_downgradeJdk15CheckBoxActionPerformed
376
FoldersListSettings.getDefault().setAgreedSetJdk15(downgradeJdk15CheckBox.isSelected());
377     }//GEN-LAST:event_downgradeJdk15CheckBoxActionPerformed
378

379     private void downgradeSourceLevel14CheckBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_downgradeSourceLevel14CheckBoxActionPerformed
380
FoldersListSettings.getDefault().setAgreedSetSourceLevel14(downgradeSourceLevel14CheckBox.isSelected());
381     }//GEN-LAST:event_downgradeSourceLevel14CheckBoxActionPerformed
382

383     private void downgradeJdk14CheckBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_downgradeJdk14CheckBoxActionPerformed
384
FoldersListSettings.getDefault().setAgreedSetJdk14(downgradeJdk14CheckBox.isSelected());
385     }//GEN-LAST:event_downgradeJdk14CheckBoxActionPerformed
386

387     // Variables declaration - do not modify//GEN-BEGIN:variables
388
private javax.swing.JCheckBox JavaDoc downgradeJdk14CheckBox;
389     private javax.swing.JCheckBox JavaDoc downgradeJdk15CheckBox;
390     private javax.swing.JCheckBox JavaDoc downgradeSourceLevel14CheckBox;
391     private javax.swing.JCheckBox JavaDoc downgradeSourceLevel15CheckBox;
392     private javax.swing.JPanel JavaDoc setJdk14Panel;
393     private javax.swing.JPanel JavaDoc setJdk15Panel;
394     private javax.swing.JPanel JavaDoc setSourceLevel14Panel;
395     private javax.swing.JPanel JavaDoc setSourceLevel15Panel;
396     private javax.swing.JTextArea JavaDoc warningJdk14TextArea;
397     private javax.swing.JTextArea JavaDoc warningJdk15TextArea;
398     private javax.swing.JTextArea JavaDoc warningSourceLevel14TextArea;
399     private javax.swing.JTextArea JavaDoc warningSourceLevel15TextArea;
400     // End of variables declaration//GEN-END:variables
401

402 }
403
404
Popular Tags