1 19 20 package org.netbeans.modules.tomcat5.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 jCheckBox1.setMnemonic(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "MNE_SecurityMan").charAt(0)); 39 proxyCheckBox.setMnemonic(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "MNE_HttpProxy").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 jCheckBox1 = 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 proxyCheckBox = new javax.swing.JCheckBox (); 61 62 setLayout(new java.awt.BorderLayout ()); 63 64 jPanel1.setLayout(new java.awt.GridBagLayout ()); 65 66 jvmLabel.setLabelFor(jvmComboBox); 67 org.openide.awt.Mnemonics.setLocalizedText(jvmLabel, org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "TXT_JVM")); 68 gridBagConstraints = new java.awt.GridBagConstraints (); 69 gridBagConstraints.gridx = 0; 70 gridBagConstraints.gridy = 0; 71 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 72 gridBagConstraints.insets = new java.awt.Insets (12, 12, 0, 0); 73 jPanel1.add(jvmLabel, gridBagConstraints); 74 jvmLabel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "ASCN_JVM")); 75 jvmLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "ASCD_JavaPlatform")); 76 77 org.openide.awt.Mnemonics.setLocalizedText(jvmButton, org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "TXT_ManagePlatforms")); 78 jvmButton.addActionListener(new java.awt.event.ActionListener () { 79 public void actionPerformed(java.awt.event.ActionEvent evt) { 80 jvmButtonActionPerformed(evt); 81 } 82 }); 83 84 gridBagConstraints = new java.awt.GridBagConstraints (); 85 gridBagConstraints.gridx = 2; 86 gridBagConstraints.gridy = 0; 87 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 88 gridBagConstraints.insets = new java.awt.Insets (12, 5, 0, 12); 89 jPanel1.add(jvmButton, gridBagConstraints); 90 jvmButton.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "ASCN_ManagerPlatform")); 91 jvmButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "ASCD_JavaPlatform")); 92 93 jvmComboBox.setModel(custData.getJvmModel()); 94 gridBagConstraints = new java.awt.GridBagConstraints (); 95 gridBagConstraints.gridx = 1; 96 gridBagConstraints.gridy = 0; 97 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 98 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 99 gridBagConstraints.weightx = 1.0; 100 gridBagConstraints.insets = new java.awt.Insets (12, 5, 0, 0); 101 jPanel1.add(jvmComboBox, gridBagConstraints); 102 103 jCheckBox1.setMnemonic(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "MNE_SecurityMan", new Object [] {}).charAt(0)); 104 org.openide.awt.Mnemonics.setLocalizedText(jCheckBox1, org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "TXT_SecurityMan")); 105 jCheckBox1.setIconTextGap(5); 106 jCheckBox1.setModel(custData.getSecManagerModel()); 107 gridBagConstraints = new java.awt.GridBagConstraints (); 108 gridBagConstraints.gridx = 0; 109 gridBagConstraints.gridy = 4; 110 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 111 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 112 gridBagConstraints.weightx = 1.0; 113 gridBagConstraints.weighty = 1.0; 114 gridBagConstraints.insets = new java.awt.Insets (5, 8, 0, 0); 115 jPanel1.add(jCheckBox1, gridBagConstraints); 116 jCheckBox1.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "ASCN_SecManager")); 117 jCheckBox1.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "ASCD_SecManager")); 118 119 jLabel1.setLabelFor(jTextField1); 120 org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "TXT_VMOptions")); 121 gridBagConstraints = new java.awt.GridBagConstraints (); 122 gridBagConstraints.gridx = 0; 123 gridBagConstraints.gridy = 1; 124 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 125 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 0); 126 jPanel1.add(jLabel1, gridBagConstraints); 127 jLabel1.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "ASCN_VMOpts")); 128 jLabel1.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "ASCD_VMOpts")); 129 130 jTextField1.setColumns(30); 131 jTextField1.setDocument(custData.getJavaOptsModel()); 132 gridBagConstraints = new java.awt.GridBagConstraints (); 133 gridBagConstraints.gridx = 1; 134 gridBagConstraints.gridy = 1; 135 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 136 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 137 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 138 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 12); 139 jPanel1.add(jTextField1, gridBagConstraints); 140 141 org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "TXT_VMOptionsEG")); 142 gridBagConstraints = new java.awt.GridBagConstraints (); 143 gridBagConstraints.gridx = 1; 144 gridBagConstraints.gridy = 2; 145 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 146 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 147 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 0); 148 jPanel1.add(jLabel2, gridBagConstraints); 149 jLabel2.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "ASCN_VMOptEG")); 150 jLabel2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "ASCD_VmOptsEG")); 151 152 org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "TXT_NoteChangesTakeAffect")); 153 gridBagConstraints = new java.awt.GridBagConstraints (); 154 gridBagConstraints.gridx = 0; 155 gridBagConstraints.gridy = 5; 156 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 157 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 158 gridBagConstraints.insets = new java.awt.Insets (5, 12, 12, 0); 159 jPanel1.add(jLabel3, gridBagConstraints); 160 jLabel3.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "ASCN_Note")); 161 jLabel3.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "ASCD_Note")); 162 163 proxyCheckBox.setMnemonic(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "MNE_HttpProxy", new Object [] {}).charAt(0)); 164 org.openide.awt.Mnemonics.setLocalizedText(proxyCheckBox, org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "LBL_HttpProxy", new Object [] {})); 165 proxyCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 166 proxyCheckBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 167 proxyCheckBox.setModel(custData.getProxyModel()); 168 gridBagConstraints = new java.awt.GridBagConstraints (); 169 gridBagConstraints.gridx = 0; 170 gridBagConstraints.gridy = 3; 171 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 172 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 173 gridBagConstraints.weightx = 1.0; 174 gridBagConstraints.insets = new java.awt.Insets (11, 12, 0, 0); 175 jPanel1.add(proxyCheckBox, gridBagConstraints); 176 proxyCheckBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "ACCSName_HttpProxy", new Object [] {})); 177 proxyCheckBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "ACCSDesc_HttpProxy", new Object [] {})); 178 179 add(jPanel1, java.awt.BorderLayout.CENTER); 180 181 } 183 private void jvmButtonActionPerformed(java.awt.event.ActionEvent evt) { PlatformsCustomizer.showCustomizer(null); 185 custData.loadJvmModel(); 186 } 188 189 private javax.swing.JCheckBox jCheckBox1; 191 private javax.swing.JLabel jLabel1; 192 private javax.swing.JLabel jLabel2; 193 private javax.swing.JLabel jLabel3; 194 private javax.swing.JPanel jPanel1; 195 private javax.swing.JTextField jTextField1; 196 private javax.swing.JButton jvmButton; 197 private javax.swing.JComboBox jvmComboBox; 198 private javax.swing.JLabel jvmLabel; 199 private javax.swing.JCheckBox proxyCheckBox; 200 202 } 203 | Popular Tags |