KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > ejbjarproject > ui > customizer > CustomizerJar


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.util.ArrayList JavaDoc;
24 import java.util.Enumeration JavaDoc;
25 import java.util.Iterator JavaDoc;
26 import java.util.List JavaDoc;
27 import javax.swing.JComponent JavaDoc;
28 import javax.swing.JPanel JavaDoc;
29 import javax.swing.ListCellRenderer JavaDoc;
30 import javax.swing.event.DocumentEvent JavaDoc;
31 import javax.swing.event.DocumentListener JavaDoc;
32 import javax.swing.event.ListDataEvent JavaDoc;
33 import javax.swing.event.ListDataListener JavaDoc;
34 import org.netbeans.api.project.ant.AntArtifact;
35 import org.netbeans.spi.project.support.ant.AntProjectHelper;
36 import org.netbeans.spi.project.support.ant.PropertyUtils;
37 import org.openide.DialogDisplayer;
38 import org.openide.NotifyDescriptor;
39 import org.openide.util.HelpCtx;
40 import org.openide.util.NbBundle;
41
42 /** Customizer for general project attributes.
43  *
44  * @author phrebejk
45  */

46 public class CustomizerJar extends JPanel JavaDoc implements HelpCtx.Provider {
47     
48     public CustomizerJar( EjbJarProjectProperties uiProperties ) {
49         initComponents();
50         
51         jTextFieldDistDir.setDocument( uiProperties.DIST_JAR_MODEL );
52         jTextFieldExcludes.setDocument( uiProperties.BUILD_CLASSES_EXCLUDES_MODEL );
53
54         uiProperties.JAR_COMPRESS_MODEL.setMnemonic( jCheckBoxCommpress.getMnemonic() );
55         jCheckBoxCommpress.setModel( uiProperties.JAR_COMPRESS_MODEL );
56     }
57     
58     public HelpCtx getHelpCtx() {
59         return new HelpCtx( CustomizerJar.class );
60     }
61         
62     
63     /** This method is called from within the constructor to
64      * initialize the form.
65      * WARNING: Do NOT modify this code. The content of this method is
66      * always regenerated by the Form Editor.
67      */

68     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
69
private void initComponents() {
70         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
71
72         jLabelDistDir = new javax.swing.JLabel JavaDoc();
73         jTextFieldDistDir = new javax.swing.JTextField JavaDoc();
74         jLabel2 = new javax.swing.JLabel JavaDoc();
75         jTextFieldExcludes = new javax.swing.JTextField JavaDoc();
76         jCheckBoxCommpress = new javax.swing.JCheckBox JavaDoc();
77         excludeMessage = new javax.swing.JLabel JavaDoc();
78
79         setLayout(new java.awt.GridBagLayout JavaDoc());
80
81         jLabelDistDir.setLabelFor(jTextFieldDistDir);
82         org.openide.awt.Mnemonics.setLocalizedText(jLabelDistDir, org.openide.util.NbBundle.getMessage(CustomizerJar.class, "LBL_CustomizeJar_DistDir_JTextField"));
83         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
84         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
85         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 12);
86         add(jLabelDistDir, gridBagConstraints);
87
88         jTextFieldDistDir.setEditable(false);
89         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
90         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
91         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
92         gridBagConstraints.weightx = 1.0;
93         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
94         add(jTextFieldDistDir, gridBagConstraints);
95         jTextFieldDistDir.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(CustomizerJar.class).getString("AD_jTextFieldDistDir"));
96
97         jLabel2.setLabelFor(jTextFieldExcludes);
98         org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(CustomizerJar.class, "LBL_CustomizeJar_Excludes_JTextField"));
99         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
100         gridBagConstraints.gridx = 0;
101         gridBagConstraints.gridy = 1;
102         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
103         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 0, 12);
104         add(jLabel2, gridBagConstraints);
105
106         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
107         gridBagConstraints.gridx = 1;
108         gridBagConstraints.gridy = 1;
109         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
110         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
111         gridBagConstraints.weightx = 1.0;
112         add(jTextFieldExcludes, gridBagConstraints);
113         jTextFieldExcludes.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(CustomizerJar.class).getString("AD_jTextFieldExcludes"));
114
115         org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxCommpress, org.openide.util.NbBundle.getMessage(CustomizerJar.class, "LBL_CustomizeJar_Commpres_JCheckBox"));
116         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
117         gridBagConstraints.gridx = 0;
118         gridBagConstraints.gridy = 3;
119         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
120         gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
121         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
122         gridBagConstraints.weighty = 1.0;
123         add(jCheckBoxCommpress, gridBagConstraints);
124         jCheckBoxCommpress.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(CustomizerJar.class).getString("AD_jCheckBoxCompress"));
125
126         excludeMessage.setLabelFor(jTextFieldExcludes);
127         org.openide.awt.Mnemonics.setLocalizedText(excludeMessage, org.openide.util.NbBundle.getMessage(CustomizerJar.class, "LBL_CustomizeJar_ExcludeMessage_JLabel"));
128         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
129         gridBagConstraints.gridx = 1;
130         gridBagConstraints.gridy = 2;
131         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
132         add(excludeMessage, gridBagConstraints);
133
134     }
135     // </editor-fold>//GEN-END:initComponents
136

137     
138     // Variables declaration - do not modify//GEN-BEGIN:variables
139
private javax.swing.JLabel JavaDoc excludeMessage;
140     private javax.swing.JCheckBox JavaDoc jCheckBoxCommpress;
141     private javax.swing.JLabel JavaDoc jLabel2;
142     private javax.swing.JLabel JavaDoc jLabelDistDir;
143     private javax.swing.JTextField JavaDoc jTextFieldDistDir;
144     private javax.swing.JTextField JavaDoc jTextFieldExcludes;
145     // End of variables declaration//GEN-END:variables
146

147 }
148
Popular Tags