KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > jboss4 > customizer > CustomizerJVM


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.j2ee.jboss4.customizer;
21
22 import org.netbeans.api.java.platform.PlatformsCustomizer;
23
24 /**
25  * Customizer JVM (Platform) tab.
26  *
27  * @author sherold
28  */

29 public class CustomizerJVM extends javax.swing.JPanel JavaDoc {
30     
31     private CustomizerDataSupport custData;
32     
33     /** Creates new form CustomizerJVM */
34     public CustomizerJVM(CustomizerDataSupport custData) {
35         this.custData = custData;
36         initComponents();
37         
38         // mnemonics generated in the guarded block do not work
39
proxyCheckBox.setMnemonic(org.openide.util.NbBundle.getMessage(CustomizerJVM.class, "MNE_Proxy").charAt(0));
40     }
41     
42     /** This method is called from within the constructor to
43      * initialize the form.
44      * WARNING: Do NOT modify this code. The content of this method is
45      * always regenerated by the Form Editor.
46      */

47     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
48
private void initComponents() {
49         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
50
51         jPanel1 = new javax.swing.JPanel JavaDoc();
52         jvmLabel = new javax.swing.JLabel JavaDoc();
53         jvmButton = new javax.swing.JButton JavaDoc();
54         jvmComboBox = new javax.swing.JComboBox JavaDoc();
55         proxyCheckBox = new javax.swing.JCheckBox JavaDoc();
56         jLabel1 = new javax.swing.JLabel JavaDoc();
57         jTextField1 = new javax.swing.JTextField JavaDoc();
58         jLabel2 = new javax.swing.JLabel JavaDoc();
59         jLabel3 = new javax.swing.JLabel JavaDoc();
60
61         setLayout(new java.awt.BorderLayout JavaDoc());
62
63         jPanel1.setLayout(new java.awt.GridBagLayout JavaDoc());
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 JavaDoc();
68         gridBagConstraints.gridx = 0;
69         gridBagConstraints.gridy = 0;
70         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
71         gridBagConstraints.insets = new java.awt.Insets JavaDoc(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 JavaDoc() {
78             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
79                 jvmButtonActionPerformed(evt);
80             }
81         });
82
83         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
84         gridBagConstraints.gridx = 2;
85         gridBagConstraints.gridy = 0;
86         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
87         gridBagConstraints.insets = new java.awt.Insets JavaDoc(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 JavaDoc();
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 JavaDoc(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 JavaDoc();
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 JavaDoc(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 JavaDoc();
120         gridBagConstraints.gridx = 0;
121         gridBagConstraints.gridy = 1;
122         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
123         gridBagConstraints.insets = new java.awt.Insets JavaDoc(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 JavaDoc();
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 JavaDoc(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 JavaDoc();
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 JavaDoc(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 JavaDoc();
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 JavaDoc(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     }// </editor-fold>//GEN-END:initComponents
164

165     private void jvmButtonActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jvmButtonActionPerformed
166
PlatformsCustomizer.showCustomizer(null);
167         custData.loadJvmModel();
168     }//GEN-LAST:event_jvmButtonActionPerformed
169

170     
171     // Variables declaration - do not modify//GEN-BEGIN:variables
172
private javax.swing.JLabel JavaDoc jLabel1;
173     private javax.swing.JLabel JavaDoc jLabel2;
174     private javax.swing.JLabel JavaDoc jLabel3;
175     private javax.swing.JPanel JavaDoc jPanel1;
176     private javax.swing.JTextField JavaDoc jTextField1;
177     private javax.swing.JButton JavaDoc jvmButton;
178     private javax.swing.JComboBox JavaDoc jvmComboBox;
179     private javax.swing.JLabel JavaDoc jvmLabel;
180     private javax.swing.JCheckBox JavaDoc proxyCheckBox;
181     // End of variables declaration//GEN-END:variables
182

183 }
184
Popular Tags