1 19 20 package org.netbeans.modules.j2ee.jboss4.customizer; 21 22 import org.netbeans.api.java.platform.PlatformsCustomizer; 23 24 29 public class CustomizerJVM extends javax.swing.JPanel { 30 31 private CustomizerDataSupport custData; 32 33 34 public CustomizerJVM(CustomizerDataSupport custData) { 35 this.custData = custData; 36 initComponents(); 37 38 proxyCheckBox.setMnemonic(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "MNE_Proxy").charAt(0)); 40 } 41 42 47 private void initComponents() { 49 java.awt.GridBagConstraints gridBagConstraints; 50 51 jPanel1 = new javax.swing.JPanel (); 52 jvmLabel = new javax.swing.JLabel (); 53 jvmButton = new javax.swing.JButton (); 54 jvmComboBox = new javax.swing.JComboBox (); 55 proxyCheckBox = new javax.swing.JCheckBox (); 56 jLabel1 = new javax.swing.JLabel (); 57 jTextField1 = new javax.swing.JTextField (); 58 jLabel2 = new javax.swing.JLabel (); 59 jLabel3 = new javax.swing.JLabel (); 60 61 setLayout(new java.awt.BorderLayout ()); 62 63 jPanel1.setLayout(new java.awt.GridBagLayout ()); 64 65 jvmLabel.setLabelFor(jvmComboBox); 66 org.openide.awt.Mnemonics.setLocalizedText(jvmLabel, org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "TXT_JVM")); 67 gridBagConstraints = new java.awt.GridBagConstraints (); 68 gridBagConstraints.gridx = 0; 69 gridBagConstraints.gridy = 0; 70 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 71 gridBagConstraints.insets = new java.awt.Insets (12, 12, 0, 0); 72 jPanel1.add(jvmLabel, gridBagConstraints); 73 jvmLabel.getAccessibleContext().setAccessibleName(null); 74 jvmLabel.getAccessibleContext().setAccessibleDescription(null); 75 76 org.openide.awt.Mnemonics.setLocalizedText(jvmButton, org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "TXT_ManagePlatforms")); 77 jvmButton.addActionListener(new java.awt.event.ActionListener () { 78 public void actionPerformed(java.awt.event.ActionEvent evt) { 79 jvmButtonActionPerformed(evt); 80 } 81 }); 82 83 gridBagConstraints = new java.awt.GridBagConstraints (); 84 gridBagConstraints.gridx = 2; 85 gridBagConstraints.gridy = 0; 86 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 87 gridBagConstraints.insets = new java.awt.Insets (12, 5, 0, 12); 88 jPanel1.add(jvmButton, gridBagConstraints); 89 jvmButton.getAccessibleContext().setAccessibleName(null); 90 jvmButton.getAccessibleContext().setAccessibleDescription(null); 91 92 jvmComboBox.setModel(custData.getJvmModel()); 93 gridBagConstraints = new java.awt.GridBagConstraints (); 94 gridBagConstraints.gridx = 1; 95 gridBagConstraints.gridy = 0; 96 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 97 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 98 gridBagConstraints.weightx = 1.0; 99 gridBagConstraints.insets = new java.awt.Insets (12, 5, 0, 0); 100 jPanel1.add(jvmComboBox, gridBagConstraints); 101 102 proxyCheckBox.setMnemonic(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "MNE_Proxy").charAt(0)); 103 proxyCheckBox.setText(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "LBL_Proxy")); 104 proxyCheckBox.setModel(custData.getProxyModel()); 105 gridBagConstraints = new java.awt.GridBagConstraints (); 106 gridBagConstraints.gridx = 0; 107 gridBagConstraints.gridy = 3; 108 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 109 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 110 gridBagConstraints.weightx = 1.0; 111 gridBagConstraints.weighty = 1.0; 112 gridBagConstraints.insets = new java.awt.Insets (11, 12, 0, 0); 113 jPanel1.add(proxyCheckBox, gridBagConstraints); 114 proxyCheckBox.getAccessibleContext().setAccessibleName(null); 115 proxyCheckBox.getAccessibleContext().setAccessibleDescription(null); 116 117 jLabel1.setLabelFor(jTextField1); 118 org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "TXT_VMOptions")); 119 gridBagConstraints = new java.awt.GridBagConstraints (); 120 gridBagConstraints.gridx = 0; 121 gridBagConstraints.gridy = 1; 122 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 123 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 0); 124 jPanel1.add(jLabel1, gridBagConstraints); 125 jLabel1.getAccessibleContext().setAccessibleName(null); 126 jLabel1.getAccessibleContext().setAccessibleDescription(null); 127 128 jTextField1.setColumns(30); 129 jTextField1.setDocument(custData.getJavaOptsModel()); 130 gridBagConstraints = new java.awt.GridBagConstraints (); 131 gridBagConstraints.gridx = 1; 132 gridBagConstraints.gridy = 1; 133 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 134 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 135 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 136 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 12); 137 jPanel1.add(jTextField1, gridBagConstraints); 138 139 org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "TXT_VMOptionsEG")); 140 gridBagConstraints = new java.awt.GridBagConstraints (); 141 gridBagConstraints.gridx = 1; 142 gridBagConstraints.gridy = 2; 143 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 144 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 145 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 0); 146 jPanel1.add(jLabel2, gridBagConstraints); 147 jLabel2.getAccessibleContext().setAccessibleName(null); 148 jLabel2.getAccessibleContext().setAccessibleDescription(null); 149 150 org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "TXT_NoteChangesTakeAffect")); 151 gridBagConstraints = new java.awt.GridBagConstraints (); 152 gridBagConstraints.gridx = 0; 153 gridBagConstraints.gridy = 4; 154 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 155 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 156 gridBagConstraints.insets = new java.awt.Insets (5, 12, 12, 0); 157 jPanel1.add(jLabel3, gridBagConstraints); 158 jLabel3.getAccessibleContext().setAccessibleName(null); 159 jLabel3.getAccessibleContext().setAccessibleDescription(null); 160 161 add(jPanel1, java.awt.BorderLayout.CENTER); 162 163 } 165 private void jvmButtonActionPerformed(java.awt.event.ActionEvent evt) { PlatformsCustomizer.showCustomizer(null); 167 custData.loadJvmModel(); 168 } 170 171 private javax.swing.JLabel jLabel1; 173 private javax.swing.JLabel jLabel2; 174 private javax.swing.JLabel jLabel3; 175 private javax.swing.JPanel jPanel1; 176 private javax.swing.JTextField jTextField1; 177 private javax.swing.JButton jvmButton; 178 private javax.swing.JComboBox jvmComboBox; 179 private javax.swing.JLabel jvmLabel; 180 private javax.swing.JCheckBox proxyCheckBox; 181 183 } 184 | Popular Tags |