KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > ejbjarproject > 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.j2ee.ejbjarproject.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( EjbJarProjectProperties uiProperties ) {
63         initComponents();
64
65         uiProperties.JAVAC_DEPRECATION_MODEL.setMnemonic( jCheckBoxDeprecation.getMnemonic() );
66         jCheckBoxDeprecation.setModel( uiProperties.JAVAC_DEPRECATION_MODEL );
67         uiProperties.JAVAC_DEBUG_MODEL.setMnemonic( jCheckBoxDebugInfo.getMnemonic() );
68         jCheckBoxDebugInfo.setModel( uiProperties.JAVAC_DEBUG_MODEL );
69         additionalJavacParamsJTextField.setDocument( uiProperties.JAVAC_COMPILER_ARG_MODEL );
70     }
71
72     public HelpCtx getHelpCtx() {
73         return new HelpCtx( CustomizerCompile.class );
74     }
75
76
77     /** This method is called from within the constructor to
78      * initialize the form.
79      * WARNING: Do NOT modify this code. The content of this method is
80      * always regenerated by the Form Editor.
81      */

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

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

156
157
158 }
159
Popular Tags