KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > java > j2seproject > ui > customizer > CustomizerCompile


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.java.j2seproject.ui.customizer;
21
22 import java.io.File JavaDoc;
23 import java.io.IOException JavaDoc;
24 import java.util.*;
25 import java.util.List JavaDoc;
26 import java.awt.*;
27 import javax.swing.ButtonModel JavaDoc;
28 import javax.swing.DefaultListModel JavaDoc;
29 import javax.swing.JComponent JavaDoc;
30 import javax.swing.JPanel JavaDoc;
31 import javax.swing.ListCellRenderer JavaDoc;
32 import javax.swing.event.DocumentEvent JavaDoc;
33 import javax.swing.event.DocumentListener JavaDoc;
34 import javax.swing.event.ListDataEvent JavaDoc;
35 import javax.swing.event.ListDataListener JavaDoc;
36 import javax.swing.text.Document JavaDoc;
37 import org.netbeans.api.java.platform.JavaPlatform;
38 import org.netbeans.api.java.platform.JavaPlatformManager;
39 import org.netbeans.api.java.platform.Specification;
40 import org.netbeans.api.project.ant.AntArtifact;
41 import org.netbeans.spi.project.support.ant.AntProjectHelper;
42 import org.netbeans.spi.project.support.ant.PropertyUtils;
43 import org.openide.DialogDisplayer;
44 import org.openide.NotifyDescriptor;
45 import org.openide.ErrorManager;
46 import org.openide.awt.Mnemonics;
47
48 import org.openide.filesystems.Repository;
49 import org.openide.loaders.DataObject;
50 import org.openide.loaders.TemplateWizard;
51 import org.openide.loaders.DataFolder;
52 import org.openide.loaders.DataObjectNotFoundException;
53 import org.openide.util.HelpCtx;
54
55 /**
56  *
57  * @author phrebejk
58  */

59 public class CustomizerCompile extends JPanel JavaDoc implements HelpCtx.Provider {
60
61         
62     public CustomizerCompile( J2SEProjectProperties uiProperties ) {
63         initComponents();
64                 
65         uiProperties.JAVAC_DEPRECATION_MODEL.setMnemonic( jCheckBoxDeprecation.getMnemonic() );
66         jCheckBoxDeprecation.setModel( uiProperties.JAVAC_DEPRECATION_MODEL );
67         
68         uiProperties.JAVAC_DEBUG_MODEL.setMnemonic( jCheckBoxDebugInfo.getMnemonic() );
69         jCheckBoxDebugInfo.setModel( uiProperties.JAVAC_DEBUG_MODEL );
70         
71         additionalJavacParamsJTextField.setDocument( uiProperties.JAVAC_COMPILER_ARG_MODEL );
72         
73     }
74
75     public HelpCtx getHelpCtx() {
76         return new HelpCtx( CustomizerCompile.class );
77     }
78
79
80     /** This method is called from within the constructor to
81      * initialize the form.
82      * WARNING: Do NOT modify this code. The content of this method is
83      * always regenerated by the Form Editor.
84      */

85     private void initComponents() {//GEN-BEGIN:initComponents
86
java.awt.GridBagConstraints JavaDoc gridBagConstraints;
87
88         jCheckBoxDebugInfo = new javax.swing.JCheckBox JavaDoc();
89         jCheckBoxDeprecation = new javax.swing.JCheckBox JavaDoc();
90         additionalJavacParamsJLabel = new javax.swing.JLabel JavaDoc();
91         additionalJavacParamsJTextField = new javax.swing.JTextField JavaDoc();
92         additionalJavacParamsExampleJLabel = new javax.swing.JLabel JavaDoc();
93
94         setLayout(new java.awt.GridBagLayout JavaDoc());
95
96         org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxDebugInfo, org.openide.util.NbBundle.getMessage(CustomizerCompile.class, "LBL_CustomizeCompile_Compiler_DebugInfo_JCheckBox"));
97         jCheckBoxDebugInfo.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
98         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
99         gridBagConstraints.gridx = 0;
100         gridBagConstraints.gridy = 0;
101         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
102         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
103         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
104         add(jCheckBoxDebugInfo, gridBagConstraints);
105         jCheckBoxDebugInfo.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerCompile.class, "ACSD_CustomizerCompile_jCheckBoxDebugInfo"));
106
107         org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxDeprecation, org.openide.util.NbBundle.getBundle(CustomizerCompile.class).getString("LBL_CustomizeCompile_Compiler_Deprecation_JCheckBox"));
108         jCheckBoxDeprecation.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
109         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
110         gridBagConstraints.gridx = 0;
111         gridBagConstraints.gridy = 1;
112         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
113         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
114         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
115         add(jCheckBoxDeprecation, gridBagConstraints);
116         jCheckBoxDeprecation.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerCompile.class, "ACSD_CustomizerCompile_jCheckBoxDeprecation"));
117
118         additionalJavacParamsJLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage (CustomizerCompile.class,"MNE_AdditionalCompilerOptions").charAt(0));
119         additionalJavacParamsJLabel.setLabelFor(additionalJavacParamsJTextField);
120         additionalJavacParamsJLabel.setText(org.openide.util.NbBundle.getMessage (CustomizerCompile.class,"LBL_AdditionalCompilerOptions"));
121         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
122         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
123         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 12);
124         add(additionalJavacParamsJLabel, gridBagConstraints);
125
126         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
127         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
128         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
129         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
130         gridBagConstraints.weightx = 1.0;
131         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
132         add(additionalJavacParamsJTextField, gridBagConstraints);
133         additionalJavacParamsJTextField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage (CustomizerCompile.class,"AD_AdditionalCompilerOptions"));
134
135         additionalJavacParamsExampleJLabel.setText(org.openide.util.NbBundle.getMessage (CustomizerCompile.class,"LBL_AdditionalCompilerOptionsExample"));
136         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
137         gridBagConstraints.gridx = 1;
138         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
139         gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
140         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
141         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
142         gridBagConstraints.weighty = 1.0;
143         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
144         add(additionalJavacParamsExampleJLabel, gridBagConstraints);
145
146     }//GEN-END:initComponents
147

148
149     // Variables declaration - do not modify//GEN-BEGIN:variables
150
private javax.swing.JLabel JavaDoc additionalJavacParamsExampleJLabel;
151     private javax.swing.JLabel JavaDoc additionalJavacParamsJLabel;
152     private javax.swing.JTextField JavaDoc additionalJavacParamsJTextField;
153     private javax.swing.JCheckBox JavaDoc jCheckBoxDebugInfo;
154     private javax.swing.JCheckBox JavaDoc jCheckBoxDeprecation;
155     // End of variables declaration//GEN-END:variables
156

157
158
159 }
160
Popular Tags