1 19 20 package org.netbeans.modules.j2ee.ejbjarproject.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.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 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 EjbJarProjectProperties uiProperties; 50 51 public CustomizerLibraries( EjbJarProjectProperties uiProperties, CustomizerProviderImpl.SubCategoryProvider subcat) { 52 this.uiProperties = uiProperties; 53 initComponents(); 54 55 this.putClientProperty( "HelpID", "EjbJar_CustomizerGeneral" ); 57 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 .class)); 65 jTableCpC.setDefaultRenderer( ClassPathSupport.Item.class, uiProperties.CLASS_PATH_TABLE_ITEM_RENDERER ); 66 jTableCpC.setDefaultRenderer( Boolean .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 [] models = new DefaultListModel [] { 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 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" ) ); } 140 else { 141 jLabelErrorMessage.setText( " " ); } 143 EjbJarLogicalViewProvider viewProvider = (EjbJarLogicalViewProvider) uiProperties.getProject().getLookup().lookup(EjbJarLogicalViewProvider.class); 144 viewProvider.testBroken(); 146 } 147 148 private void initTableVisualProperties(JTable table) { 149 table.setRowHeight(jTableCpC.getRowHeight() + 4); 151 table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); 152 table.setIntercellSpacing(new java.awt.Dimension (0, 0)); 153 table.getParent().setBackground(table.getBackground()); 155 table.setShowHorizontalLines(false); 156 table.setShowVerticalLines(false); 157 158 TableColumn column = table.getColumnModel().getColumn(1); 159 JTableHeader header = table.getTableHeader(); 160 column.setMaxWidth(24 + SwingUtilities.computeStringWidth(header.getFontMetrics(header.getFont()), String.valueOf(column.getHeaderValue()))); 161 header.setReorderingAllowed(false); 162 } 163 164 166 public HelpCtx getHelpCtx() { 167 return new HelpCtx( CustomizerLibraries.class ); 168 } 169 170 171 173 174 public void intervalRemoved( ListDataEvent e ) { 175 testBroken(); 176 } 177 178 public void intervalAdded( ListDataEvent e ) { 179 } 181 182 public void contentsChanged( ListDataEvent e ) { 183 } 185 186 private void showSubCategory (String 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 204 private void initComponents() { 206 java.awt.GridBagConstraints gridBagConstraints; 207 208 jLabelTarget = new javax.swing.JLabel (); 209 jComboBoxTarget = new javax.swing.JComboBox (); 210 jButton1 = new javax.swing.JButton (); 211 jTabbedPane1 = new javax.swing.JTabbedPane (); 212 jPanelCompile = new javax.swing.JPanel (); 213 librariesJLabel1 = new javax.swing.JLabel (); 214 librariesJScrollPane = new javax.swing.JScrollPane (); 215 jTableCpC = new javax.swing.JTable (); 216 jButtonAddArtifactC = new javax.swing.JButton (); 217 jButtonAddLibraryC = new javax.swing.JButton (); 218 jButtonAddJarC = new javax.swing.JButton (); 219 jButtonEditC = new javax.swing.JButton (); 220 jButtonRemoveC = new javax.swing.JButton (); 221 jButtonMoveUpC = new javax.swing.JButton (); 222 jButtonMoveDownC = new javax.swing.JButton (); 223 jPanelCompileTests = new javax.swing.JPanel (); 224 librariesJLabel2 = new javax.swing.JLabel (); 225 librariesJScrollPane1 = new javax.swing.JScrollPane (); 226 jListCpCT = new javax.swing.JList (); 227 jButtonAddArtifactCT = new javax.swing.JButton (); 228 jButtonAddLibraryCT = new javax.swing.JButton (); 229 jButtonAddJarCT = new javax.swing.JButton (); 230 jButtonEditCT = new javax.swing.JButton (); 231 jButtonRemoveCT = new javax.swing.JButton (); 232 jButtonMoveUpCT = new javax.swing.JButton (); 233 jButtonMoveDownCT = new javax.swing.JButton (); 234 jPanelRunTests = new javax.swing.JPanel (); 235 librariesJLabel4 = new javax.swing.JLabel (); 236 librariesJScrollPane3 = new javax.swing.JScrollPane (); 237 jListCpRT = new javax.swing.JList (); 238 jButtonAddArtifactRT = new javax.swing.JButton (); 239 jButtonAddLibraryRT = new javax.swing.JButton (); 240 jButtonAddJarRT = new javax.swing.JButton (); 241 jButtonEditRT = new javax.swing.JButton (); 242 jButtonRemoveRT = new javax.swing.JButton (); 243 jButtonMoveUpRT = new javax.swing.JButton (); 244 jButtonMoveDownRT = new javax.swing.JButton (); 245 jCheckBoxBuildSubprojects = new javax.swing.JCheckBox (); 246 jLabelErrorMessage = new javax.swing.JLabel (); 247 248 setLayout(new java.awt.GridBagLayout ()); 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 (); 253 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 254 gridBagConstraints.insets = new java.awt.Insets (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 (); 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 (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 () { 267 public void actionPerformed(java.awt.event.ActionEvent evt) { 268 createNewPlatform(evt); 269 } 270 }); 271 272 gridBagConstraints = new java.awt.GridBagConstraints (); 273 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 274 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 275 gridBagConstraints.insets = new java.awt.Insets (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 ()); 280 281 jPanelCompile.setBorder(new javax.swing.border.EmptyBorder (new java.awt.Insets (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 (); 284 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 285 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 286 gridBagConstraints.insets = new java.awt.Insets (0, 0, 6, 0); 287 jPanelCompile.add(librariesJLabel1, gridBagConstraints); 288 289 jTableCpC.setModel(new javax.swing.table.DefaultTableModel ( 290 new Object [][] { 291 {null, null, null, null}, 292 {null, null, null, null}, 293 {null, null, null, null}, 294 {null, null, null, null} 295 }, 296 new String [] { 297 "Title 1", "Title 2", "Title 3", "Title 4" 298 } 299 )); 300 librariesJScrollPane.setViewportView(jTableCpC); 301 302 gridBagConstraints = new java.awt.GridBagConstraints (); 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 (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 (); 312 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 313 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 314 gridBagConstraints.insets = new java.awt.Insets (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 (); 319 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 320 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 321 gridBagConstraints.insets = new java.awt.Insets (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 (); 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 (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 (); 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 (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 (); 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 (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 (); 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 (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 (); 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 (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 ()); 368 369 jPanelCompileTests.setBorder(new javax.swing.border.EmptyBorder (new java.awt.Insets (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 (); 372 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 373 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 374 gridBagConstraints.insets = new java.awt.Insets (0, 0, 6, 0); 375 jPanelCompileTests.add(librariesJLabel2, gridBagConstraints); 376 377 librariesJScrollPane1.setViewportView(jListCpCT); 378 379 gridBagConstraints = new java.awt.GridBagConstraints (); 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 (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 (); 389 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 390 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 391 gridBagConstraints.insets = new java.awt.Insets (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 (); 396 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 397 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 398 gridBagConstraints.insets = new java.awt.Insets (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 (); 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 (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 (); 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 (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 (); 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 (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 (); 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 (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 (); 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 (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 ()); 445 446 jPanelRunTests.setBorder(new javax.swing.border.EmptyBorder (new java.awt.Insets (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 (); 449 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 450 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 451 gridBagConstraints.insets = new java.awt.Insets (0, 0, 6, 0); 452 jPanelRunTests.add(librariesJLabel4, gridBagConstraints); 453 454 librariesJScrollPane3.setViewportView(jListCpRT); 455 456 gridBagConstraints = new java.awt.GridBagConstraints (); 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 (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 (); 466 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 467 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 468 gridBagConstraints.insets = new java.awt.Insets (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 (); 473 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 474 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 475 gridBagConstraints.insets = new java.awt.Insets (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 (); 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 (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 (); 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 (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 (); 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 (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 (); 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 (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 (); 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 (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 (); 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 (0, 0, 0, 0)); 529 gridBagConstraints = new java.awt.GridBagConstraints (); 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 (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 (); 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 (12, 0, 0, 0); 544 add(jLabelErrorMessage, gridBagConstraints); 545 546 } 547 549 private void createNewPlatform(java.awt.event.ActionEvent evt) { Object selectedItem = this.jComboBoxTarget.getSelectedItem(); 551 JavaPlatform jp = (selectedItem == null ? null : PlatformUiSupport.getPlatform(selectedItem)); 552 PlatformsCustomizer.showCustomizer(jp); 553 } 555 556 private javax.swing.JButton jButton1; 558 private javax.swing.JButton jButtonAddArtifactC; 559 private javax.swing.JButton jButtonAddArtifactCT; 560 private javax.swing.JButton jButtonAddArtifactRT; 561 private javax.swing.JButton jButtonAddJarC; 562 private javax.swing.JButton jButtonAddJarCT; 563 private javax.swing.JButton jButtonAddJarRT; 564 private javax.swing.JButton jButtonAddLibraryC; 565 private javax.swing.JButton jButtonAddLibraryCT; 566 private javax.swing.JButton jButtonAddLibraryRT; 567 private javax.swing.JButton jButtonEditC; 568 private javax.swing.JButton jButtonEditCT; 569 private javax.swing.JButton jButtonEditRT; 570 private javax.swing.JButton jButtonMoveDownC; 571 private javax.swing.JButton jButtonMoveDownCT; 572 private javax.swing.JButton jButtonMoveDownRT; 573 private javax.swing.JButton jButtonMoveUpC; 574 private javax.swing.JButton jButtonMoveUpCT; 575 private javax.swing.JButton jButtonMoveUpRT; 576 private javax.swing.JButton jButtonRemoveC; 577 private javax.swing.JButton jButtonRemoveCT; 578 private javax.swing.JButton jButtonRemoveRT; 579 private javax.swing.JCheckBox jCheckBoxBuildSubprojects; 580 private javax.swing.JComboBox jComboBoxTarget; 581 private javax.swing.JLabel jLabelErrorMessage; 582 private javax.swing.JLabel jLabelTarget; 583 private javax.swing.JList jListCpCT; 584 private javax.swing.JList jListCpRT; 585 private javax.swing.JPanel jPanelCompile; 586 private javax.swing.JPanel jPanelCompileTests; 587 private javax.swing.JPanel jPanelRunTests; 588 private javax.swing.JTabbedPane jTabbedPane1; 589 private javax.swing.JTable jTableCpC; 590 private javax.swing.JLabel librariesJLabel1; 591 private javax.swing.JLabel librariesJLabel2; 592 private javax.swing.JLabel librariesJLabel4; 593 private javax.swing.JScrollPane librariesJScrollPane; 594 private javax.swing.JScrollPane librariesJScrollPane1; 595 private javax.swing.JScrollPane librariesJScrollPane3; 596 598 599 } 600 | Popular Tags |