KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > ejbjarproject > 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.ejbjarproject.ui.wizards;
21
22 import org.netbeans.api.java.platform.JavaPlatform;
23 import org.netbeans.api.java.platform.JavaPlatformManager;
24 import org.netbeans.api.java.platform.Specification;
25 import org.netbeans.modules.j2ee.deployment.devmodules.api.J2eeModule;
26 import org.netbeans.modules.j2ee.ejbjarproject.ui.FoldersListSettings;
27 import org.openide.modules.SpecificationVersion;
28
29 /**
30  * Displays a warning that the project's Java platform will be set to JDK 1.4 or
31  * the source level will be set to 1.4. See issue #55797.
32  *
33  * @author Andrei Badea
34  */

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

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

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

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

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

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

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

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

57     private String JavaDoc warningType;
58     private String JavaDoc javaPlatformName;
59     
60     public J2eeVersionWarningPanel(String JavaDoc warningType) {
61         initComponents();
62         setWarningType(warningType);
63     }
64     
65     public String JavaDoc getWarningType() {
66         return warningType;
67     }
68     
69     public void setWarningType(String JavaDoc warningType) {
70         String JavaDoc warningText = null;
71         String JavaDoc checkBoxText = null;
72         
73         this.warningType = warningType;
74         
75         setJdk14Panel.setVisible(false);
76         setSourceLevel14Panel.setVisible(false);
77         setJdk15Panel.setVisible(false);
78         setSourceLevel15Panel.setVisible(false);
79         
80         if (WARN_SET_JDK_14.equals(warningType)) {
81             setJdk14Panel.setVisible(true);
82             downgradeJdk14CheckBox.setSelected(FoldersListSettings.getDefault().isAgreedSetJdk14());
83         } else if (WARN_SET_SOURCE_LEVEL_14.equals(warningType)) {
84             setSourceLevel14Panel.setVisible(true);
85             downgradeSourceLevel14CheckBox.setSelected(FoldersListSettings.getDefault().isAgreedSetSourceLevel14());
86         } else if (WARN_SET_JDK_15.equals(warningType)) {
87             setJdk15Panel.setVisible(true);
88             downgradeJdk15CheckBox.setSelected(FoldersListSettings.getDefault().isAgreedSetJdk15());
89         } else if (WARN_SET_SOURCE_LEVEL_15.equals(warningType)) {
90             setSourceLevel15Panel.setVisible(true);
91             downgradeSourceLevel15CheckBox.setSelected(FoldersListSettings.getDefault().isAgreedSetSourceLevel15());
92         }
93     }
94     
95     public boolean getDowngradeAllowed() {
96         if (WARN_SET_JDK_14.equals(warningType)) {
97             return downgradeJdk14CheckBox.isSelected();
98         } else if (WARN_SET_SOURCE_LEVEL_14.equals(warningType)) {
99             return downgradeSourceLevel14CheckBox.isSelected();
100         } else if (WARN_SET_JDK_15.equals(warningType)) {
101             return downgradeJdk15CheckBox.isSelected();
102         } else if (WARN_SET_SOURCE_LEVEL_15.equals(warningType)) {
103             return downgradeSourceLevel15CheckBox.isSelected();
104         } else return false;
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 // System.out.println("findWarningType: j2eeLevel="+j2eeLevel);
121
JavaPlatform defaultPlatform = JavaPlatformManager.getDefault().getDefaultPlatform();
122         SpecificationVersion version = defaultPlatform.getSpecification().getVersion();
123         String JavaDoc sourceLevel = version.toString();
124         // #89131: these levels are not actually distinct from 1.5.
125
if (sourceLevel.equals("1.6") || sourceLevel.equals("1.7"))
126             sourceLevel = "1.5";
127 // System.out.println("default platform is "+version);
128

129         // no warning if 1.4 is the default for j2ee14
130
if (new SpecificationVersion("1.4").equals(version) && j2eeLevel.equals(J2eeModule.J2EE_14)) // NOI18N
131
return null;
132         
133         // no warning if 1.5, 1.6, 1.7 is the default for j2ee15
134
if ("1.5".equals(sourceLevel) && j2eeLevel.equals(J2eeModule.JAVA_EE_5)) // NOI18N
135
return null;
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.4, so we warn we'll downgrade to 1.4
151
return WARN_SET_JDK_15;
152             } else {
153                 // no JDK 1.4, the best we can do is downgrade the source level to 1.4
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.setFocusable(false);
194         warningJdk14TextArea.setOpaque(false);
195         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
196         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
197         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
198         gridBagConstraints.weightx = 1.0;
199         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
200         setJdk14Panel.add(warningJdk14TextArea, gridBagConstraints);
201         warningJdk14TextArea.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSN_RecommendationSetJdk14")); // NOI18N
202
warningJdk14TextArea.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSD_RecommendationSetJdk14")); // NOI18N
203

204         downgradeJdk14CheckBox.setMnemonic(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "MNE_AgreeSetJdk14").charAt(0));
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.setFocusable(false);
238         warningSourceLevel15TextArea.setOpaque(false);
239         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
240         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
241         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
242         gridBagConstraints.weightx = 1.0;
243         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
244         setSourceLevel15Panel.add(warningSourceLevel15TextArea, gridBagConstraints);
245         warningSourceLevel15TextArea.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSN_RecommendationSetSourceLevel15")); // NOI18N
246
warningSourceLevel15TextArea.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSD_RecommendationSetSourceLevel15")); // NOI18N
247

248         downgradeSourceLevel15CheckBox.setMnemonic(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "MNE_AgreeSetSourceLevel15").charAt(0));
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.setFocusable(false);
284         warningJdk15TextArea.setOpaque(false);
285         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
286         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
287         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
288         gridBagConstraints.weightx = 1.0;
289         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
290         setJdk15Panel.add(warningJdk15TextArea, gridBagConstraints);
291         warningJdk15TextArea.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSN_RecommendationSetJdk15")); // NOI18N
292
warningJdk15TextArea.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSD_RecommendationSetJdk15")); // NOI18N
293

294         downgradeJdk15CheckBox.setMnemonic(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "MNE_AgreeSetJdk15").charAt(0));
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.setFocusable(false);
330         warningSourceLevel14TextArea.setOpaque(false);
331         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
332         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
333         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
334         gridBagConstraints.weightx = 1.0;
335         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
336         setSourceLevel14Panel.add(warningSourceLevel14TextArea, gridBagConstraints);
337         warningSourceLevel14TextArea.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSN_LabelSetSourceLevel14")); // NOI18N
338
warningSourceLevel14TextArea.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "ACSD_LabelSetSourceLevel14")); // NOI18N
339

340         downgradeSourceLevel14CheckBox.setMnemonic(org.openide.util.NbBundle.getMessage(J2eeVersionWarningPanel.class, "MNE_AgreeSetSourceLevel14").charAt(0));
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