1 19 20 package org.netbeans.modules.web.project.ui.customizer; 21 22 import java.util.Iterator ; 23 import javax.swing.DefaultListModel ; 24 import javax.swing.JPanel ; 25 import javax.swing.ListSelectionModel ; 26 import javax.swing.SwingUtilities ; 27 import javax.swing.JTable ; 28 import javax.swing.event.ListDataEvent ; 29 import javax.swing.event.ListDataListener ; 30 import javax.swing.table.JTableHeader ; 31 import javax.swing.table.TableColumn ; 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 43 public class CustomizerLibraries extends JPanel implements HelpCtx.Provider, ListDataListener { 44 45 public static final String COMPILE = "COMPILE"; 46 public static final String COMPILE_TESTS = "COMPILE_TESTS"; 47 public static final String 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 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 .class)); 63 jTableCpC.setDefaultRenderer( ClassPathSupport.Item.class, uiProperties.CLASS_PATH_TABLE_ITEM_RENDERER ); 64 jTableCpC.setDefaultRenderer( Boolean .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 [] models = new DefaultListModel [] { 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 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" ) ); } 139 else { 140 jLabelErrorMessage.setText( " " ); } 142 WebLogicalViewProvider viewProvider = (WebLogicalViewProvider) uiProperties.getProject().getLookup().lookup(WebLogicalViewProvider.class); 143 viewProvider.testBroken(); 145 } 146 147 private void initTableVisualProperties(JTable table) { 148 table.setRowHeight(jTableCpC.getRowHeight() + 4); 150 table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); 151 table.setIntercellSpacing(new java.awt.Dimension (0, 0)); 152 table.getParent().setBackground(table.getBackground()); 154 table.setShowHorizontalLines(false); 155 table.setShowVerticalLines(false); 156 157 TableColumn column = table.getColumnModel().getColumn(1); 158 JTableHeader header = table.getTableHeader(); 159 column.setMaxWidth(24 + SwingUtilities.computeStringWidth(header.getFontMetrics(header.getFont()), String.valueOf(column.getHeaderValue()))); 160 161 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 172 public HelpCtx getHelpCtx() { 173 return new HelpCtx( CustomizerLibraries.class ); 174 } 175 176 177 179 180 public void intervalRemoved( ListDataEvent e ) { 181 testBroken(); 182 } 183 184 public void intervalAdded( ListDataEvent e ) { 185 } 187 188 public void contentsChanged( ListDataEvent e ) { 189 } 191 192 private void showSubCategory (String 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 209 private void initComponents() { 211 java.awt.GridBagConstraints gridBagConstraints; 212 213 jLabelTarget = new javax.swing.JLabel (); 214 jComboBoxTarget = new javax.swing.JComboBox (); 215 jButton1 = new javax.swing.JButton (); 216 jTabbedPane1 = new javax.swing.JTabbedPane (); 217 jPanelCompile = new javax.swing.JPanel (); 218 librariesJLabel1 = new javax.swing.JLabel (); 219 librariesJScrollPane = new javax.swing.JScrollPane (); 220 jTableCpC = new javax.swing.JTable (); 221 jButtonAddArtifactC = new javax.swing.JButton (); 222 jButtonAddLibraryC = new javax.swing.JButton (); 223 jButtonAddJarC = new javax.swing.JButton (); 224 jButtonEditC = new javax.swing.JButton (); 225 jButtonRemoveC = new javax.swing.JButton (); 226 jButtonMoveUpC = new javax.swing.JButton (); 227 jButtonMoveDownC = new javax.swing.JButton (); 228 jLabel1 = new javax.swing.JLabel (); 229 jPanelCompileTests = new javax.swing.JPanel (); 230 librariesJLabel2 = new javax.swing.JLabel (); 231 librariesJScrollPane1 = new javax.swing.JScrollPane (); 232 jListCpCT = new javax.swing.JList (); 233 jButtonAddArtifactCT = new javax.swing.JButton (); 234 jButtonAddLibraryCT = new javax.swing.JButton (); 235 jButtonAddJarCT = new javax.swing.JButton (); 236 jButtonEditCT = new javax.swing.JButton (); 237 jButtonRemoveCT = new javax.swing.JButton (); 238 jButtonMoveUpCT = new javax.swing.JButton (); 239 jButtonMoveDownCT = new javax.swing.JButton (); 240 jPanelRunTests = new javax.swing.JPanel (); 241 librariesJLabel4 = new javax.swing.JLabel (); 242 librariesJScrollPane3 = new javax.swing.JScrollPane (); 243 jListCpRT = new javax.swing.JList (); 244 jButtonAddArtifactRT = new javax.swing.JButton (); 245 jButtonAddLibraryRT = new javax.swing.JButton (); 246 jButtonAddJarRT = new javax.swing.JButton (); 247 jButtonEditRT = new javax.swing.JButton (); 248 jButtonRemoveRT = new javax.swing.JButton (); 249 jButtonMoveUpRT = new javax.swing.JButton (); 250 jButtonMoveDownRT = new javax.swing.JButton (); 251 jCheckBoxBuildSubprojects = new javax.swing.JCheckBox (); 252 jLabelErrorMessage = new javax.swing.JLabel (); 253 254 setLayout(new java.awt.GridBagLayout ()); 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 (); 259 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 260 gridBagConstraints.insets = new java.awt.Insets (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 (); 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 (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 () { 273 public void actionPerformed(java.awt.event.ActionEvent evt) { 274 createNewPlatform(evt); 275 } 276 }); 277 278 gridBagConstraints = new java.awt.GridBagConstraints (); 279 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 280 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 281 gridBagConstraints.insets = new java.awt.Insets (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 ()); 286 287 jPanelCompile.setBorder(new javax.swing.border.EmptyBorder (new java.awt.Insets (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 (); 291 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 292 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 293 gridBagConstraints.insets = new java.awt.Insets (0, 0, 6, 0); 294 jPanelCompile.add(librariesJLabel1, gridBagConstraints); 295 296 jTableCpC.setModel(new javax.swing.table.DefaultTableModel ( 297 new Object [][] { 298 {null, null, null, null}, 299 {null, null, null, null}, 300 {null, null, null, null}, 301 {null, null, null, null} 302 }, 303 new String [] { 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 (); 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 (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 (); 320 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 321 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 322 gridBagConstraints.insets = new java.awt.Insets (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 (); 328 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 329 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 330 gridBagConstraints.insets = new java.awt.Insets (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 (); 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 (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 (); 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 (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 (); 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 (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 (); 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 (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 (); 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 (); 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 (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 ()); 393 394 jPanelCompileTests.setBorder(new javax.swing.border.EmptyBorder (new java.awt.Insets (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 (); 398 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 399 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 400 gridBagConstraints.insets = new java.awt.Insets (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 (); 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 (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 (); 416 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 417 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 418 gridBagConstraints.insets = new java.awt.Insets (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 (); 424 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 425 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 426 gridBagConstraints.insets = new java.awt.Insets (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 (); 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 (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 (); 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 (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 (); 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 (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 (); 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 (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 (); 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 (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 ()); 479 480 jPanelRunTests.setBorder(new javax.swing.border.EmptyBorder (new java.awt.Insets (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 (); 484 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 485 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 486 gridBagConstraints.insets = new java.awt.Insets (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 (); 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 (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 (); 502 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 503 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 504 gridBagConstraints.insets = new java.awt.Insets (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 (); 510 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 511 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 512 gridBagConstraints.insets = new java.awt.Insets (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 (); 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 (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 (); 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 (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 (); 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 (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 (); 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 (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 (); 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 (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 (); 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 (0, 0, 0, 0)); 574 gridBagConstraints = new java.awt.GridBagConstraints (); 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 (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 (); 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 (12, 0, 0, 0); 589 add(jLabelErrorMessage, gridBagConstraints); 590 591 } 592 594 private void createNewPlatform(java.awt.event.ActionEvent evt) { Object selectedItem = this.jComboBoxTarget.getSelectedItem(); 596 JavaPlatform jp = (selectedItem == null ? null : PlatformUiSupport.getPlatform(selectedItem)); 597 PlatformsCustomizer.showCustomizer(jp); 598 } 600 601 private javax.swing.JButton jButton1; 603 private javax.swing.JButton jButtonAddArtifactC; 604 private javax.swing.JButton jButtonAddArtifactCT; 605 private javax.swing.JButton jButtonAddArtifactRT; 606 private javax.swing.JButton jButtonAddJarC; 607 private javax.swing.JButton jButtonAddJarCT; 608 private javax.swing.JButton jButtonAddJarRT; 609 private javax.swing.JButton jButtonAddLibraryC; 610 private javax.swing.JButton jButtonAddLibraryCT; 611 private javax.swing.JButton jButtonAddLibraryRT; 612 private javax.swing.JButton jButtonEditC; 613 private javax.swing.JButton jButtonEditCT; 614 private javax.swing.JButton jButtonEditRT; 615 private javax.swing.JButton jButtonMoveDownC; 616 private javax.swing.JButton jButtonMoveDownCT; 617 private javax.swing.JButton jButtonMoveDownRT; 618 private javax.swing.JButton jButtonMoveUpC; 619 private javax.swing.JButton jButtonMoveUpCT; 620 private javax.swing.JButton jButtonMoveUpRT; 621 private javax.swing.JButton jButtonRemoveC; 622 private javax.swing.JButton jButtonRemoveCT; 623 private javax.swing.JButton jButtonRemoveRT; 624 private javax.swing.JCheckBox jCheckBoxBuildSubprojects; 625 private javax.swing.JComboBox jComboBoxTarget; 626 private javax.swing.JLabel jLabel1; 627 private javax.swing.JLabel jLabelErrorMessage; 628 private javax.swing.JLabel jLabelTarget; 629 private javax.swing.JList jListCpCT; 630 private javax.swing.JList jListCpRT; 631 private javax.swing.JPanel jPanelCompile; 632 private javax.swing.JPanel jPanelCompileTests; 633 private javax.swing.JPanel jPanelRunTests; 634 private javax.swing.JTabbedPane jTabbedPane1; 635 private javax.swing.JTable jTableCpC; 636 private javax.swing.JLabel librariesJLabel1; 637 private javax.swing.JLabel librariesJLabel2; 638 private javax.swing.JLabel librariesJLabel4; 639 private javax.swing.JScrollPane librariesJScrollPane; 640 private javax.swing.JScrollPane librariesJScrollPane1; 641 private javax.swing.JScrollPane librariesJScrollPane3; 642 644 645 } 646 | Popular Tags |