1 19 20 package org.netbeans.modules.j2ee.earproject.ui.customizer; 21 22 import javax.swing.JButton ; 23 import javax.swing.JPanel ; 24 import org.openide.util.HelpCtx; 25 import org.openide.util.NbBundle; 26 27 public final class CustomizerLibraries extends JPanel implements ArchiveCustomizerPanel, HelpCtx.Provider { 28 29 private final VisualPropertySupport vps; 31 32 private final VisualClasspathSupport vws; 33 34 public CustomizerLibraries(final EarProjectProperties earProperties) { 35 initComponents(); 36 this.getAccessibleContext().setAccessibleDescription( 37 NbBundle.getMessage(CustomizerLibraries.class, "ACS_CustomizeRun_A11YDesc")); vws = new VisualClasspathSupport(earProperties.getProject(), 39 (String ) earProperties.get(EarProjectProperties.J2EE_PLATFORM), 40 jTableAddContent, 41 jButtonAddJar, 42 jButtonAddLib, 43 jButtonAddProject, 44 new JButton (), jButtonRemove, 46 new JButton (), 47 new JButton (), true); 48 vps = new VisualPropertySupport(earProperties); 49 } 50 51 public void initValues() { 52 vps.register(vws, EarProjectProperties.RUN_CLASSPATH); 53 } 54 55 60 private void initComponents() { 62 java.awt.GridBagConstraints gridBagConstraints; 63 64 embeddedCPPanel = new javax.swing.JPanel (); 65 jLabelEmbeddedCP = new javax.swing.JLabel (); 66 jScrollPane2 = new javax.swing.JScrollPane (); 67 jTableAddContent = new javax.swing.JTable (); 68 jButtonAddJar = new javax.swing.JButton (); 69 jButtonAddLib = new javax.swing.JButton (); 70 jButtonAddProject = new javax.swing.JButton (); 71 jButtonRemove = new javax.swing.JButton (); 72 73 setLayout(new java.awt.GridBagLayout ()); 74 75 embeddedCPPanel.setLayout(new java.awt.GridBagLayout ()); 76 77 jLabelEmbeddedCP.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 78 jLabelEmbeddedCP.setLabelFor(jTableAddContent); 79 org.openide.awt.Mnemonics.setLocalizedText(jLabelEmbeddedCP, org.openide.util.NbBundle.getBundle(CustomizerLibraries.class).getString("LBL_CustomizerRun_EmbeddedClasspathElements_JLabel")); jLabelEmbeddedCP.setVerticalAlignment(javax.swing.SwingConstants.TOP); 81 gridBagConstraints = new java.awt.GridBagConstraints (); 82 gridBagConstraints.gridx = 0; 83 gridBagConstraints.gridy = 0; 84 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 85 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 86 gridBagConstraints.insets = new java.awt.Insets (0, 0, 0, 12); 87 embeddedCPPanel.add(jLabelEmbeddedCP, gridBagConstraints); 88 89 jTableAddContent.setModel(new javax.swing.table.DefaultTableModel ( 90 new Object [][] { 91 92 }, 93 new String [] { 94 95 } 96 )); 97 jScrollPane2.setViewportView(jTableAddContent); 98 99 gridBagConstraints = new java.awt.GridBagConstraints (); 100 gridBagConstraints.gridx = 0; 101 gridBagConstraints.gridy = 1; 102 gridBagConstraints.gridheight = 4; 103 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 104 gridBagConstraints.weightx = 10.0; 105 gridBagConstraints.weighty = 1.0; 106 gridBagConstraints.insets = new java.awt.Insets (0, 0, 0, 11); 107 embeddedCPPanel.add(jScrollPane2, gridBagConstraints); 108 109 org.openide.awt.Mnemonics.setLocalizedText(jButtonAddJar, org.openide.util.NbBundle.getBundle(CustomizerLibraries.class).getString("LBL_CustomizeEAR_AddJar_JButton")); gridBagConstraints = new java.awt.GridBagConstraints (); 111 gridBagConstraints.gridx = 1; 112 gridBagConstraints.gridy = 1; 113 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 114 gridBagConstraints.insets = new java.awt.Insets (0, 0, 5, 0); 115 embeddedCPPanel.add(jButtonAddJar, gridBagConstraints); 116 117 org.openide.awt.Mnemonics.setLocalizedText(jButtonAddLib, org.openide.util.NbBundle.getBundle(CustomizerLibraries.class).getString("LBL_CustomizeCompile_Classpath_AddLibrary_JButton")); gridBagConstraints = new java.awt.GridBagConstraints (); 119 gridBagConstraints.gridx = 1; 120 gridBagConstraints.gridy = 2; 121 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 122 gridBagConstraints.insets = new java.awt.Insets (0, 0, 5, 0); 123 embeddedCPPanel.add(jButtonAddLib, gridBagConstraints); 124 125 org.openide.awt.Mnemonics.setLocalizedText(jButtonAddProject, org.openide.util.NbBundle.getBundle(CustomizerLibraries.class).getString("LBL_CustomizeCompile_Classpath_AddProject_JButton")); gridBagConstraints = new java.awt.GridBagConstraints (); 127 gridBagConstraints.gridx = 1; 128 gridBagConstraints.gridy = 3; 129 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 130 gridBagConstraints.insets = new java.awt.Insets (0, 0, 11, 0); 131 embeddedCPPanel.add(jButtonAddProject, gridBagConstraints); 132 133 org.openide.awt.Mnemonics.setLocalizedText(jButtonRemove, org.openide.util.NbBundle.getBundle(CustomizerLibraries.class).getString("LBL_CustomizeCompile_Classpath_Remove_JButton")); gridBagConstraints = new java.awt.GridBagConstraints (); 135 gridBagConstraints.gridx = 1; 136 gridBagConstraints.gridy = 4; 137 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 138 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH; 139 embeddedCPPanel.add(jButtonRemove, gridBagConstraints); 140 141 gridBagConstraints = new java.awt.GridBagConstraints (); 142 gridBagConstraints.gridx = 0; 143 gridBagConstraints.gridy = 0; 144 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 145 gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; 146 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 147 gridBagConstraints.weightx = 1.0; 148 gridBagConstraints.weighty = 1.0; 149 add(embeddedCPPanel, gridBagConstraints); 150 151 } 153 private javax.swing.JPanel embeddedCPPanel; 155 private javax.swing.JButton jButtonAddJar; 156 private javax.swing.JButton jButtonAddLib; 157 private javax.swing.JButton jButtonAddProject; 158 private javax.swing.JButton jButtonRemove; 159 private javax.swing.JLabel jLabelEmbeddedCP; 160 private javax.swing.JScrollPane jScrollPane2; 161 private javax.swing.JTable jTableAddContent; 162 164 public HelpCtx getHelpCtx() { 165 return new HelpCtx(CustomizerLibraries.class); 166 } 167 168 } 169 | Popular Tags |