KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > web > project > 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.web.project.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.web.project.classpath.ClassPathSupport;
35 import org.netbeans.modules.web.project.ui.WebLogicalViewProvider;
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     WebProjectProperties uiProperties;
50     
51     public CustomizerLibraries( WebProjectProperties uiProperties, CustomizerProviderImpl.SubCategoryProvider subcat) {
52         this.uiProperties = uiProperties;
53         initComponents();
54
55         // Hide unused edit buttons
56
jButtonEditC.setVisible( false );
57         jButtonEditCT.setVisible( false );
58         jButtonEditRT.setVisible( false );
59         
60         jTableCpC.setModel( uiProperties.JAVAC_CLASSPATH_MODEL );
61         initTableVisualProperties(jTableCpC);
62         uiProperties.CLASS_PATH_TABLE_ITEM_RENDERER.setBooleanRenderer(jTableCpC.getDefaultRenderer(Boolean JavaDoc.class));
63         jTableCpC.setDefaultRenderer( ClassPathSupport.Item.class, uiProperties.CLASS_PATH_TABLE_ITEM_RENDERER );
64         jTableCpC.setDefaultRenderer( Boolean JavaDoc.class, uiProperties.CLASS_PATH_TABLE_ITEM_RENDERER );
65         
66         WebClassPathUi.EditMediator.register( uiProperties.getProject(),
67                                                WebClassPathUi.EditMediator.createListComponent( jTableCpC, uiProperties.JAVAC_CLASSPATH_MODEL.getDefaultListModel()),
68                                                jButtonAddJarC.getModel(),
69                                                jButtonAddLibraryC.getModel(),
70                                                jButtonAddArtifactC.getModel(),
71                                                jButtonRemoveC.getModel(),
72                                                jButtonMoveUpC.getModel(),
73                                                jButtonMoveDownC.getModel(),
74                                                true );
75         
76         jListCpCT.setModel( uiProperties.JAVAC_TEST_CLASSPATH_MODEL);
77         jListCpCT.setCellRenderer( uiProperties.CLASS_PATH_LIST_RENDERER );
78         WebClassPathUi.EditMediator.register( uiProperties.getProject(),
79                                                WebClassPathUi.EditMediator.createListComponent( jListCpCT) ,
80                                                jButtonAddJarCT.getModel(),
81                                                jButtonAddLibraryCT.getModel(),
82                                                jButtonAddArtifactCT.getModel(),
83                                                jButtonRemoveCT.getModel(),
84                                                jButtonMoveUpCT.getModel(),
85                                                jButtonMoveDownCT.getModel(),
86                                                false );
87                 
88         jListCpRT.setModel( uiProperties.RUN_TEST_CLASSPATH_MODEL );
89         jListCpRT.setCellRenderer( uiProperties.CLASS_PATH_LIST_RENDERER );
90         WebClassPathUi.EditMediator.register( uiProperties.getProject(),
91                                                WebClassPathUi.EditMediator.createListComponent( jListCpRT),
92                                                jButtonAddJarRT.getModel(),
93                                                jButtonAddLibraryRT.getModel(),
94                                                jButtonAddArtifactRT.getModel(),
95                                                jButtonRemoveRT.getModel(),
96                                                jButtonMoveUpRT.getModel(),
97                                                jButtonMoveDownRT.getModel(),
98                                                false );
99         
100         uiProperties.NO_DEPENDENCIES_MODEL.setMnemonic( jCheckBoxBuildSubprojects.getMnemonic() );
101         jCheckBoxBuildSubprojects.setModel( uiProperties.NO_DEPENDENCIES_MODEL );
102         jComboBoxTarget.setModel(uiProperties.PLATFORM_MODEL);
103         jComboBoxTarget.setRenderer(uiProperties.PLATFORM_LIST_RENDERER);
104         testBroken();
105         if (WebCompositePanelProvider.LIBRARIES.equals(subcat.getCategory())) {
106             showSubCategory(subcat.getSubcategory());
107         }
108         
109         uiProperties.JAVAC_CLASSPATH_MODEL.getDefaultListModel().addListDataListener( this );
110         uiProperties.JAVAC_TEST_CLASSPATH_MODEL.addListDataListener( this );
111         uiProperties.RUN_TEST_CLASSPATH_MODEL.addListDataListener( this );
112     }
113         
114     private void testBroken() {
115         
116         DefaultListModel JavaDoc[] models = new DefaultListModel JavaDoc[] {
117             uiProperties.JAVAC_CLASSPATH_MODEL.getDefaultListModel(),
118             uiProperties.JAVAC_TEST_CLASSPATH_MODEL,
119             uiProperties.RUN_TEST_CLASSPATH_MODEL,
120         };
121         
122         boolean broken = false;
123         
124         for( int i = 0; i < models.length; i++ ) {
125             for( Iterator JavaDoc it = ClassPathUiSupport.getIterator( models[i] ); it.hasNext(); ) {
126                 if ( ((ClassPathSupport.Item)it.next()).isBroken() ) {
127                     broken = true;
128                     break;
129                 }
130             }
131             if ( broken ) {
132                 break;
133             }
134         }
135         
136         if ( broken ) {
137             jLabelErrorMessage.setText( NbBundle.getMessage( CustomizerLibraries.class, "LBL_CustomizeLibraries_Libraries_Error" ) ); // NOI18N
138
}
139         else {
140             jLabelErrorMessage.setText( " " ); // NOI18N
141
}
142         WebLogicalViewProvider viewProvider = (WebLogicalViewProvider) uiProperties.getProject().getLookup().lookup(WebLogicalViewProvider.class);
143         //Update the state of project's node if needed
144
viewProvider.testBroken();
145     }
146     
147     private void initTableVisualProperties(JTable JavaDoc table) {
148         //table.setGridColor(jTableCpC.getBackground());
149
table.setRowHeight(jTableCpC.getRowHeight() + 4);
150         table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
151         table.setIntercellSpacing(new java.awt.Dimension JavaDoc(0, 0));
152         // set the color of the table's JViewport
153
table.getParent().setBackground(table.getBackground());
154         table.setShowHorizontalLines(false);
155         table.setShowVerticalLines(false);
156
157         TableColumn JavaDoc column = table.getColumnModel().getColumn(1);
158         JTableHeader JavaDoc header = table.getTableHeader();
159         column.setMaxWidth(24 + SwingUtilities.computeStringWidth(header.getFontMetrics(header.getFont()), String.valueOf(column.getHeaderValue())));
160     
161     //#58200 - Need horizontal scrollbar for library names
162
//ugly but I didn't find a better way how to do it
163
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
164         column = table.getColumnModel().getColumn(0);
165     column.setMinWidth(230);
166     column.setWidth(230);
167     column.setMinWidth(75);
168     }
169     
170     // Implementation of HelpCtx.Provider --------------------------------------
171

172     public HelpCtx getHelpCtx() {
173         return new HelpCtx( CustomizerLibraries.class );
174     }
175
176     
177     // Implementation of ListDataListener --------------------------------------
178

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

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

594     private void createNewPlatform(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_createNewPlatform
595
Object JavaDoc selectedItem = this.jComboBoxTarget.getSelectedItem();
596         JavaPlatform jp = (selectedItem == null ? null : PlatformUiSupport.getPlatform(selectedItem));
597         PlatformsCustomizer.showCustomizer(jp);
598     }//GEN-LAST:event_createNewPlatform
599

600     
601     // Variables declaration - do not modify//GEN-BEGIN:variables
602
private javax.swing.JButton JavaDoc jButton1;
603     private javax.swing.JButton JavaDoc jButtonAddArtifactC;
604     private javax.swing.JButton JavaDoc jButtonAddArtifactCT;
605     private javax.swing.JButton JavaDoc jButtonAddArtifactRT;
606     private javax.swing.JButton JavaDoc jButtonAddJarC;
607     private javax.swing.JButton JavaDoc jButtonAddJarCT;
608     private javax.swing.JButton JavaDoc jButtonAddJarRT;
609     private javax.swing.JButton JavaDoc jButtonAddLibraryC;
610     private javax.swing.JButton JavaDoc jButtonAddLibraryCT;
611     private javax.swing.JButton JavaDoc jButtonAddLibraryRT;
612     private javax.swing.JButton JavaDoc jButtonEditC;
613     private javax.swing.JButton JavaDoc jButtonEditCT;
614     private javax.swing.JButton JavaDoc jButtonEditRT;
615     private javax.swing.JButton JavaDoc jButtonMoveDownC;
616     private javax.swing.JButton JavaDoc jButtonMoveDownCT;
617     private javax.swing.JButton JavaDoc jButtonMoveDownRT;
618     private javax.swing.JButton JavaDoc jButtonMoveUpC;
619     private javax.swing.JButton JavaDoc jButtonMoveUpCT;
620     private javax.swing.JButton JavaDoc jButtonMoveUpRT;
621     private javax.swing.JButton JavaDoc jButtonRemoveC;
622     private javax.swing.JButton JavaDoc jButtonRemoveCT;
623     private javax.swing.JButton JavaDoc jButtonRemoveRT;
624     private javax.swing.JCheckBox JavaDoc jCheckBoxBuildSubprojects;
625     private javax.swing.JComboBox JavaDoc jComboBoxTarget;
626     private javax.swing.JLabel JavaDoc jLabel1;
627     private javax.swing.JLabel JavaDoc jLabelErrorMessage;
628     private javax.swing.JLabel JavaDoc jLabelTarget;
629     private javax.swing.JList JavaDoc jListCpCT;
630     private javax.swing.JList JavaDoc jListCpRT;
631     private javax.swing.JPanel JavaDoc jPanelCompile;
632     private javax.swing.JPanel JavaDoc jPanelCompileTests;
633     private javax.swing.JPanel JavaDoc jPanelRunTests;
634     private javax.swing.JTabbedPane JavaDoc jTabbedPane1;
635     private javax.swing.JTable JavaDoc jTableCpC;
636     private javax.swing.JLabel JavaDoc librariesJLabel1;
637     private javax.swing.JLabel JavaDoc librariesJLabel2;
638     private javax.swing.JLabel JavaDoc librariesJLabel4;
639     private javax.swing.JScrollPane JavaDoc librariesJScrollPane;
640     private javax.swing.JScrollPane JavaDoc librariesJScrollPane1;
641     private javax.swing.JScrollPane JavaDoc librariesJScrollPane3;
642     // End of variables declaration//GEN-END:variables
643

644         
645 }
646
Popular Tags