KickJava   Java API By Example, From Geeks To Geeks.

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


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.customizer;
21
22 import java.util.Iterator JavaDoc;
23 import javax.swing.DefaultListModel JavaDoc;
24 import javax.swing.JPanel JavaDoc;
25 import javax.swing.ListSelectionModel JavaDoc;
26 import javax.swing.SwingUtilities JavaDoc;
27 import javax.swing.JTable JavaDoc;
28 import javax.swing.event.ListDataEvent JavaDoc;
29 import javax.swing.event.ListDataListener JavaDoc;
30 import javax.swing.table.JTableHeader JavaDoc;
31 import javax.swing.table.TableColumn JavaDoc;
32 import org.netbeans.api.java.platform.JavaPlatform;
33 import org.netbeans.api.java.platform.PlatformsCustomizer;
34 import org.netbeans.modules.j2ee.ejbjarproject.classpath.ClassPathSupport;
35 import org.netbeans.modules.j2ee.ejbjarproject.ui.EjbJarLogicalViewProvider;
36 import org.openide.util.HelpCtx;
37 import org.openide.util.NbBundle;
38
39 /** Customizer for general project attributes.
40  *
41  * @author phrebejk
42  */

43 public class CustomizerLibraries extends JPanel JavaDoc implements HelpCtx.Provider, ListDataListener JavaDoc {
44     
45     public static final String JavaDoc COMPILE = "COMPILE";
46     public static final String JavaDoc COMPILE_TESTS = "COMPILE_TESTS";
47     public static final String JavaDoc RUN_TESTS = "RUN_TESTS";
48     
49     EjbJarProjectProperties uiProperties;
50     
51     public CustomizerLibraries( EjbJarProjectProperties uiProperties, CustomizerProviderImpl.SubCategoryProvider subcat) {
52         this.uiProperties = uiProperties;
53         initComponents();
54
55         this.putClientProperty( "HelpID", "EjbJar_CustomizerGeneral" ); // NOI18N
56

57         // Hide unused edit buttons
58
jButtonEditC.setVisible( false );
59         jButtonEditCT.setVisible( false );
60         jButtonEditRT.setVisible( false );
61         
62         jTableCpC.setModel( uiProperties.JAVAC_CLASSPATH_MODEL );
63         initTableVisualProperties(jTableCpC);
64         uiProperties.CLASS_PATH_TABLE_ITEM_RENDERER.setBooleanRenderer(jTableCpC.getDefaultRenderer(Boolean JavaDoc.class));
65         jTableCpC.setDefaultRenderer( ClassPathSupport.Item.class, uiProperties.CLASS_PATH_TABLE_ITEM_RENDERER );
66         jTableCpC.setDefaultRenderer( Boolean JavaDoc.class, uiProperties.CLASS_PATH_TABLE_ITEM_RENDERER );
67         
68         EjbJarClassPathUi.EditMediator.register( uiProperties.getProject(),
69                                                EjbJarClassPathUi.EditMediator.createListComponent( jTableCpC, uiProperties.JAVAC_CLASSPATH_MODEL.getDefaultListModel()),
70                                                jButtonAddJarC.getModel(),
71                                                jButtonAddLibraryC.getModel(),
72                                                jButtonAddArtifactC.getModel(),
73                                                jButtonRemoveC.getModel(),
74                                                jButtonMoveUpC.getModel(),
75                                                jButtonMoveDownC.getModel(),
76                                                true );
77         
78         jListCpCT.setModel( uiProperties.JAVAC_TEST_CLASSPATH_MODEL);
79         jListCpCT.setCellRenderer( uiProperties.CLASS_PATH_LIST_RENDERER );
80         EjbJarClassPathUi.EditMediator.register( uiProperties.getProject(),
81                                                EjbJarClassPathUi.EditMediator.createListComponent( jListCpCT) ,
82                                                jButtonAddJarCT.getModel(),
83                                                jButtonAddLibraryCT.getModel(),
84                                                jButtonAddArtifactCT.getModel(),
85                                                jButtonRemoveCT.getModel(),
86                                                jButtonMoveUpCT.getModel(),
87                                                jButtonMoveDownCT.getModel(),
88                                                false );
89                 
90         jListCpRT.setModel( uiProperties.RUN_TEST_CLASSPATH_MODEL );
91         jListCpRT.setCellRenderer( uiProperties.CLASS_PATH_LIST_RENDERER );
92         EjbJarClassPathUi.EditMediator.register( uiProperties.getProject(),
93                                                EjbJarClassPathUi.EditMediator.createListComponent( jListCpRT),
94                                                jButtonAddJarRT.getModel(),
95                                                jButtonAddLibraryRT.getModel(),
96                                                jButtonAddArtifactRT.getModel(),
97                                                jButtonRemoveRT.getModel(),
98                                                jButtonMoveUpRT.getModel(),
99                                                jButtonMoveDownRT.getModel(),
100                                                false );
101         
102         jCheckBoxBuildSubprojects.setModel( uiProperties.NO_DEPENDENCIES_MODEL );
103         jComboBoxTarget.setModel(uiProperties.PLATFORM_MODEL);
104         jComboBoxTarget.setRenderer(uiProperties.PLATFORM_LIST_RENDERER);
105         testBroken();
106         if (EjbJarCompositePanelProvider.LIBRARIES.equals(subcat.getCategory())) {
107             showSubCategory(subcat.getSubcategory());
108         }
109         
110         uiProperties.JAVAC_CLASSPATH_MODEL.getDefaultListModel().addListDataListener( this );
111         uiProperties.JAVAC_TEST_CLASSPATH_MODEL.addListDataListener( this );
112         uiProperties.RUN_TEST_CLASSPATH_MODEL.addListDataListener( this );
113     }
114         
115     private void testBroken() {
116         
117         DefaultListModel JavaDoc[] models = new DefaultListModel JavaDoc[] {
118             uiProperties.JAVAC_CLASSPATH_MODEL.getDefaultListModel(),
119             uiProperties.JAVAC_TEST_CLASSPATH_MODEL,
120             uiProperties.RUN_TEST_CLASSPATH_MODEL,
121         };
122         
123         boolean broken = false;
124         
125         for( int i = 0; i < models.length; i++ ) {
126             for( Iterator JavaDoc it = ClassPathUiSupport.getIterator( models[i] ); it.hasNext(); ) {
127                 if ( ((ClassPathSupport.Item)it.next()).isBroken() ) {
128                     broken = true;
129                     break;
130                 }
131             }
132             if ( broken ) {
133                 break;
134             }
135         }
136         
137         if ( broken ) {
138             jLabelErrorMessage.setText( NbBundle.getMessage( CustomizerLibraries.class, "LBL_CustomizeLibraries_Libraries_Error" ) ); // NOI18N
139
}
140         else {
141             jLabelErrorMessage.setText( " " ); // NOI18N
142
}
143         EjbJarLogicalViewProvider viewProvider = (EjbJarLogicalViewProvider) uiProperties.getProject().getLookup().lookup(EjbJarLogicalViewProvider.class);
144         //Update the state of project's node if needed
145
viewProvider.testBroken();
146     }
147     
148     private void initTableVisualProperties(JTable JavaDoc table) {
149         //table.setGridColor(jTableCpC.getBackground());
150
table.setRowHeight(jTableCpC.getRowHeight() + 4);
151         table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
152         table.setIntercellSpacing(new java.awt.Dimension JavaDoc(0, 0));
153         // set the color of the table's JViewport
154
table.getParent().setBackground(table.getBackground());
155         table.setShowHorizontalLines(false);
156         table.setShowVerticalLines(false);
157         
158         TableColumn JavaDoc column = table.getColumnModel().getColumn(1);
159         JTableHeader JavaDoc header = table.getTableHeader();
160         column.setMaxWidth(24 + SwingUtilities.computeStringWidth(header.getFontMetrics(header.getFont()), String.valueOf(column.getHeaderValue())));
161         header.setReorderingAllowed(false);
162     }
163     
164     // Implementation of HelpCtx.Provider --------------------------------------
165

166     public HelpCtx getHelpCtx() {
167         return new HelpCtx( CustomizerLibraries.class );
168     }
169
170     
171     // Implementation of ListDataListener --------------------------------------
172

173     
174     public void intervalRemoved( ListDataEvent JavaDoc e ) {
175         testBroken();
176     }
177
178     public void intervalAdded( ListDataEvent JavaDoc e ) {
179         // NOP
180
}
181
182     public void contentsChanged( ListDataEvent JavaDoc e ) {
183         // NOP
184
}
185     
186     private void showSubCategory (String JavaDoc name) {
187         if (name.equals(COMPILE)) {
188             jTabbedPane1.setSelectedIndex(0);
189         }
190         else if (name.equals(COMPILE_TESTS)) {
191             jTabbedPane1.setSelectedIndex(1);
192         }
193         else if (name.equals(RUN_TESTS)) {
194             jTabbedPane1.setSelectedIndex(2);
195         }
196     }
197     
198     
199     /** This method is called from within the constructor to
200      * initialize the form.
201      * WARNING: Do NOT modify this code. The content of this method is
202      * always regenerated by the Form Editor.
203      */

204     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
205
private void initComponents() {
206         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
207
208         jLabelTarget = new javax.swing.JLabel JavaDoc();
209         jComboBoxTarget = new javax.swing.JComboBox JavaDoc();
210         jButton1 = new javax.swing.JButton JavaDoc();
211         jTabbedPane1 = new javax.swing.JTabbedPane JavaDoc();
212         jPanelCompile = new javax.swing.JPanel JavaDoc();
213         librariesJLabel1 = new javax.swing.JLabel JavaDoc();
214         librariesJScrollPane = new javax.swing.JScrollPane JavaDoc();
215         jTableCpC = new javax.swing.JTable JavaDoc();
216         jButtonAddArtifactC = new javax.swing.JButton JavaDoc();
217         jButtonAddLibraryC = new javax.swing.JButton JavaDoc();
218         jButtonAddJarC = new javax.swing.JButton JavaDoc();
219         jButtonEditC = new javax.swing.JButton JavaDoc();
220         jButtonRemoveC = new javax.swing.JButton JavaDoc();
221         jButtonMoveUpC = new javax.swing.JButton JavaDoc();
222         jButtonMoveDownC = new javax.swing.JButton JavaDoc();
223         jPanelCompileTests = new javax.swing.JPanel JavaDoc();
224         librariesJLabel2 = new javax.swing.JLabel JavaDoc();
225         librariesJScrollPane1 = new javax.swing.JScrollPane JavaDoc();
226         jListCpCT = new javax.swing.JList JavaDoc();
227         jButtonAddArtifactCT = new javax.swing.JButton JavaDoc();
228         jButtonAddLibraryCT = new javax.swing.JButton JavaDoc();
229         jButtonAddJarCT = new javax.swing.JButton JavaDoc();
230         jButtonEditCT = new javax.swing.JButton JavaDoc();
231         jButtonRemoveCT = new javax.swing.JButton JavaDoc();
232         jButtonMoveUpCT = new javax.swing.JButton JavaDoc();
233         jButtonMoveDownCT = new javax.swing.JButton JavaDoc();
234         jPanelRunTests = new javax.swing.JPanel JavaDoc();
235         librariesJLabel4 = new javax.swing.JLabel JavaDoc();
236         librariesJScrollPane3 = new javax.swing.JScrollPane JavaDoc();
237         jListCpRT = new javax.swing.JList JavaDoc();
238         jButtonAddArtifactRT = new javax.swing.JButton JavaDoc();
239         jButtonAddLibraryRT = new javax.swing.JButton JavaDoc();
240         jButtonAddJarRT = new javax.swing.JButton JavaDoc();
241         jButtonEditRT = new javax.swing.JButton JavaDoc();
242         jButtonRemoveRT = new javax.swing.JButton JavaDoc();
243         jButtonMoveUpRT = new javax.swing.JButton JavaDoc();
244         jButtonMoveDownRT = new javax.swing.JButton JavaDoc();
245         jCheckBoxBuildSubprojects = new javax.swing.JCheckBox JavaDoc();
246         jLabelErrorMessage = new javax.swing.JLabel JavaDoc();
247
248         setLayout(new java.awt.GridBagLayout JavaDoc());
249
250         jLabelTarget.setLabelFor(jComboBoxTarget);
251         org.openide.awt.Mnemonics.setLocalizedText(jLabelTarget, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeGeneral_Platform_JLabel"));
252         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
253         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
254         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 12);
255         add(jLabelTarget, gridBagConstraints);
256         jLabelTarget.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "ACSD_CustomizerGeneral_jLabelTarget"));
257
258         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
259         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
260         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
261         gridBagConstraints.weightx = 1.0;
262         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
263         add(jComboBoxTarget, gridBagConstraints);
264
265         org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeGeneral_Platform_JButton"));
266         jButton1.addActionListener(new java.awt.event.ActionListener JavaDoc() {
267             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
268                 createNewPlatform(evt);
269             }
270         });
271
272         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
273         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
274         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
275         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 6, 12, 0);
276         add(jButton1, gridBagConstraints);
277         jButton1.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "ACSD_CustomizerGeneral_jButton1"));
278
279         jPanelCompile.setLayout(new java.awt.GridBagLayout JavaDoc());
280
281         jPanelCompile.setBorder(new javax.swing.border.EmptyBorder JavaDoc(new java.awt.Insets JavaDoc(8, 8, 8, 8)));
282         org.openide.awt.Mnemonics.setLocalizedText(librariesJLabel1, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_LibrariesC_JLabel"));
283         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
284         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
285         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
286         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 6, 0);
287         jPanelCompile.add(librariesJLabel1, gridBagConstraints);
288
289         jTableCpC.setModel(new javax.swing.table.DefaultTableModel JavaDoc(
290             new Object JavaDoc [][] {
291                 {null, null, null, null},
292                 {null, null, null, null},
293                 {null, null, null, null},
294                 {null, null, null, null}
295             },
296             new String JavaDoc [] {
297                 "Title 1", "Title 2", "Title 3", "Title 4"
298             }
299         ));
300         librariesJScrollPane.setViewportView(jTableCpC);
301
302         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
303         gridBagConstraints.gridheight = 7;
304         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
305         gridBagConstraints.weightx = 1.0;
306         gridBagConstraints.weighty = 1.0;
307         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 0, 12);
308         jPanelCompile.add(librariesJScrollPane, gridBagConstraints);
309
310         org.openide.awt.Mnemonics.setLocalizedText(jButtonAddArtifactC, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_AddProject_JButton"));
311         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
312         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
313         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
314         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
315         jPanelCompile.add(jButtonAddArtifactC, gridBagConstraints);
316
317         org.openide.awt.Mnemonics.setLocalizedText(jButtonAddLibraryC, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_AddLibary_JButton"));
318         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
319         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
320         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
321         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
322         jPanelCompile.add(jButtonAddLibraryC, gridBagConstraints);
323
324         org.openide.awt.Mnemonics.setLocalizedText(jButtonAddJarC, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_AddJar_JButton"));
325         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
326         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
327         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
328         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
329         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
330         jPanelCompile.add(jButtonAddJarC, gridBagConstraints);
331
332         org.openide.awt.Mnemonics.setLocalizedText(jButtonEditC, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_Edit_JButton"));
333         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
334         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
335         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
336         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
337         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
338         jPanelCompile.add(jButtonEditC, gridBagConstraints);
339
340         org.openide.awt.Mnemonics.setLocalizedText(jButtonRemoveC, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_Remove_JButton"));
341         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
342         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
343         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
344         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
345         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
346         jPanelCompile.add(jButtonRemoveC, gridBagConstraints);
347
348         org.openide.awt.Mnemonics.setLocalizedText(jButtonMoveUpC, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_MoveUp_JButton"));
349         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
350         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
351         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
352         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
353         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
354         jPanelCompile.add(jButtonMoveUpC, gridBagConstraints);
355
356         org.openide.awt.Mnemonics.setLocalizedText(jButtonMoveDownC, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_MoveDown_JButton"));
357         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
358         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
359         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
360         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
361         gridBagConstraints.weighty = 1.0;
362         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
363         jPanelCompile.add(jButtonMoveDownC, gridBagConstraints);
364
365         jTabbedPane1.addTab(org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_LibrariesTab"), jPanelCompile);
366
367         jPanelCompileTests.setLayout(new java.awt.GridBagLayout JavaDoc());
368
369         jPanelCompileTests.setBorder(new javax.swing.border.EmptyBorder JavaDoc(new java.awt.Insets JavaDoc(8, 8, 8, 8)));
370         org.openide.awt.Mnemonics.setLocalizedText(librariesJLabel2, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_LibrariesCT_JLabel"));
371         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
372         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
373         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
374         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 6, 0);
375         jPanelCompileTests.add(librariesJLabel2, gridBagConstraints);
376
377         librariesJScrollPane1.setViewportView(jListCpCT);
378
379         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
380         gridBagConstraints.gridheight = 7;
381         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
382         gridBagConstraints.weightx = 1.0;
383         gridBagConstraints.weighty = 1.0;
384         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 0, 12);
385         jPanelCompileTests.add(librariesJScrollPane1, gridBagConstraints);
386
387         org.openide.awt.Mnemonics.setLocalizedText(jButtonAddArtifactCT, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_AddProject_JButton"));
388         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
389         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
390         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
391         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
392         jPanelCompileTests.add(jButtonAddArtifactCT, gridBagConstraints);
393
394         org.openide.awt.Mnemonics.setLocalizedText(jButtonAddLibraryCT, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_AddLibary_JButton"));
395         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
396         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
397         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
398         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
399         jPanelCompileTests.add(jButtonAddLibraryCT, gridBagConstraints);
400
401         org.openide.awt.Mnemonics.setLocalizedText(jButtonAddJarCT, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_AddJar_JButton"));
402         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
403         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
404         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
405         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
406         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
407         jPanelCompileTests.add(jButtonAddJarCT, gridBagConstraints);
408
409         org.openide.awt.Mnemonics.setLocalizedText(jButtonEditCT, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_Edit_JButton"));
410         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
411         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
412         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
413         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
414         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
415         jPanelCompileTests.add(jButtonEditCT, gridBagConstraints);
416
417         org.openide.awt.Mnemonics.setLocalizedText(jButtonRemoveCT, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_Remove_JButton"));
418         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
419         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
420         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
421         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
422         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
423         jPanelCompileTests.add(jButtonRemoveCT, gridBagConstraints);
424
425         org.openide.awt.Mnemonics.setLocalizedText(jButtonMoveUpCT, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_MoveUp_JButton"));
426         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
427         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
428         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
429         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
430         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
431         jPanelCompileTests.add(jButtonMoveUpCT, gridBagConstraints);
432
433         org.openide.awt.Mnemonics.setLocalizedText(jButtonMoveDownCT, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_MoveDown_JButton"));
434         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
435         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
436         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
437         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
438         gridBagConstraints.weighty = 1.0;
439         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
440         jPanelCompileTests.add(jButtonMoveDownCT, gridBagConstraints);
441
442         jTabbedPane1.addTab(org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_TestLibrariesTab"), jPanelCompileTests);
443
444         jPanelRunTests.setLayout(new java.awt.GridBagLayout JavaDoc());
445
446         jPanelRunTests.setBorder(new javax.swing.border.EmptyBorder JavaDoc(new java.awt.Insets JavaDoc(8, 8, 8, 8)));
447         org.openide.awt.Mnemonics.setLocalizedText(librariesJLabel4, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_LibrariesRT_JLabel"));
448         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
449         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
450         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
451         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 6, 0);
452         jPanelRunTests.add(librariesJLabel4, gridBagConstraints);
453
454         librariesJScrollPane3.setViewportView(jListCpRT);
455
456         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
457         gridBagConstraints.gridheight = 7;
458         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
459         gridBagConstraints.weightx = 1.0;
460         gridBagConstraints.weighty = 1.0;
461         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 0, 12);
462         jPanelRunTests.add(librariesJScrollPane3, gridBagConstraints);
463
464         org.openide.awt.Mnemonics.setLocalizedText(jButtonAddArtifactRT, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_AddProject_JButton"));
465         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
466         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
467         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
468         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
469         jPanelRunTests.add(jButtonAddArtifactRT, gridBagConstraints);
470
471         org.openide.awt.Mnemonics.setLocalizedText(jButtonAddLibraryRT, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_AddLibary_JButton"));
472         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
473         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
474         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
475         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
476         jPanelRunTests.add(jButtonAddLibraryRT, gridBagConstraints);
477
478         org.openide.awt.Mnemonics.setLocalizedText(jButtonAddJarRT, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_AddJar_JButton"));
479         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
480         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
481         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
482         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
483         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
484         jPanelRunTests.add(jButtonAddJarRT, gridBagConstraints);
485
486         org.openide.awt.Mnemonics.setLocalizedText(jButtonEditRT, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_Edit_JButton"));
487         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
488         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
489         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
490         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
491         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
492         jPanelRunTests.add(jButtonEditRT, gridBagConstraints);
493
494         org.openide.awt.Mnemonics.setLocalizedText(jButtonRemoveRT, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_Remove_JButton"));
495         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
496         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
497         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
498         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
499         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
500         jPanelRunTests.add(jButtonRemoveRT, gridBagConstraints);
501
502         org.openide.awt.Mnemonics.setLocalizedText(jButtonMoveUpRT, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_MoveUp_JButton"));
503         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
504         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
505         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
506         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
507         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 5, 0);
508         jPanelRunTests.add(jButtonMoveUpRT, gridBagConstraints);
509
510         org.openide.awt.Mnemonics.setLocalizedText(jButtonMoveDownRT, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_MoveDown_JButton"));
511         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
512         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
513         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
514         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
515         gridBagConstraints.weighty = 1.0;
516         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 12, 0);
517         jPanelRunTests.add(jButtonMoveDownRT, gridBagConstraints);
518
519         jTabbedPane1.addTab(org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_RunTests_Tab"), jPanelRunTests);
520
521         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
522         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
523         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
524         gridBagConstraints.weighty = 1.0;
525         add(jTabbedPane1, gridBagConstraints);
526
527         org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxBuildSubprojects, org.openide.util.NbBundle.getMessage(CustomizerLibraries.class, "LBL_CustomizeLibraries_Build_Subprojects"));
528         jCheckBoxBuildSubprojects.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
529         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
530         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
531         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
532         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
533         gridBagConstraints.insets = new java.awt.Insets JavaDoc(6, 0, 0, 0);
534         add(jCheckBoxBuildSubprojects, gridBagConstraints);
535         jCheckBoxBuildSubprojects.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(CustomizerLibraries.class, "AD_CheckBoxBuildSubprojects"));
536
537         org.openide.awt.Mnemonics.setLocalizedText(jLabelErrorMessage, " ");
538         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
539         gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
540         gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
541         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
542         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
543         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 0, 0, 0);
544         add(jLabelErrorMessage, gridBagConstraints);
545
546     }
547     // </editor-fold>//GEN-END:initComponents
548

549     private void createNewPlatform(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_createNewPlatform
550
Object JavaDoc selectedItem = this.jComboBoxTarget.getSelectedItem();
551         JavaPlatform jp = (selectedItem == null ? null : PlatformUiSupport.getPlatform(selectedItem));
552         PlatformsCustomizer.showCustomizer(jp);
553     }//GEN-LAST:event_createNewPlatform
554

555     
556     // Variables declaration - do not modify//GEN-BEGIN:variables
557
private javax.swing.JButton JavaDoc jButton1;
558     private javax.swing.JButton JavaDoc jButtonAddArtifactC;
559     private javax.swing.JButton JavaDoc jButtonAddArtifactCT;
560     private javax.swing.JButton JavaDoc jButtonAddArtifactRT;
561     private javax.swing.JButton JavaDoc jButtonAddJarC;
562     private javax.swing.JButton JavaDoc jButtonAddJarCT;
563     private javax.swing.JButton JavaDoc jButtonAddJarRT;
564     private javax.swing.JButton JavaDoc jButtonAddLibraryC;
565     private javax.swing.JButton JavaDoc jButtonAddLibraryCT;
566     private javax.swing.JButton JavaDoc jButtonAddLibraryRT;
567     private javax.swing.JButton JavaDoc jButtonEditC;
568     private javax.swing.JButton JavaDoc jButtonEditCT;
569     private javax.swing.JButton JavaDoc jButtonEditRT;
570     private javax.swing.JButton JavaDoc jButtonMoveDownC;
571     private javax.swing.JButton JavaDoc jButtonMoveDownCT;
572     private javax.swing.JButton JavaDoc jButtonMoveDownRT;
573     private javax.swing.JButton JavaDoc jButtonMoveUpC;
574     private javax.swing.JButton JavaDoc jButtonMoveUpCT;
575     private javax.swing.JButton JavaDoc jButtonMoveUpRT;
576     private javax.swing.JButton JavaDoc jButtonRemoveC;
577     private javax.swing.JButton JavaDoc jButtonRemoveCT;
578     private javax.swing.JButton JavaDoc jButtonRemoveRT;
579     private javax.swing.JCheckBox JavaDoc jCheckBoxBuildSubprojects;
580     private javax.swing.JComboBox JavaDoc jComboBoxTarget;
581     private javax.swing.JLabel JavaDoc jLabelErrorMessage;
582     private javax.swing.JLabel JavaDoc jLabelTarget;
583     private javax.swing.JList JavaDoc jListCpCT;
584     private javax.swing.JList JavaDoc jListCpRT;
585     private javax.swing.JPanel JavaDoc jPanelCompile;
586     private javax.swing.JPanel JavaDoc jPanelCompileTests;
587     private javax.swing.JPanel JavaDoc jPanelRunTests;
588     private javax.swing.JTabbedPane JavaDoc jTabbedPane1;
589     private javax.swing.JTable JavaDoc jTableCpC;
590     private javax.swing.JLabel JavaDoc librariesJLabel1;
591     private javax.swing.JLabel JavaDoc librariesJLabel2;
592     private javax.swing.JLabel JavaDoc librariesJLabel4;
593     private javax.swing.JScrollPane JavaDoc librariesJScrollPane;
594     private javax.swing.JScrollPane JavaDoc librariesJScrollPane1;
595     private javax.swing.JScrollPane JavaDoc librariesJScrollPane3;
596     // End of variables declaration//GEN-END:variables
597

598         
599 }
600
Popular Tags