001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.tomcat5.customizer;
043:
044: import javax.swing.JSpinner.NumberEditor;
045: import org.openide.awt.Mnemonics;
046: import org.openide.util.NbBundle;
047:
048: /**
049: * Customizer deployment tab.
050: *
051: * @author sherold
052: */
053: public class CustomizerDeployment extends javax.swing.JPanel {
054:
055: private final CustomizerDataSupport custData;
056:
057: /** Creates new form CustomizerDeployment */
058: public CustomizerDeployment(CustomizerDataSupport custData) {
059: this .custData = custData;
060: initComponents();
061: ((NumberEditor) deploymentTimeoutSpinner.getEditor())
062: .getTextField().setColumns(5);
063: // working around the issue #111094
064: Mnemonics
065: .setLocalizedText(
066: driverDeploymentjCheckBox,
067: NbBundle
068: .getMessage(CustomizerDeployment.class,
069: "CustomizerDeployment.driverDeploymentjCheckBox.text"));
070: }
071:
072: /** This method is called from within the constructor to
073: * initialize the form.
074: * WARNING: Do NOT modify this code. The content of this method is
075: * always regenerated by the Form Editor.
076: */
077: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
078: private void initComponents() {
079:
080: driverDeploymentjCheckBox = new javax.swing.JCheckBox();
081: deploymentTimeoutSpinner = new javax.swing.JSpinner();
082: deplolymentTimeoutLabel = new javax.swing.JLabel();
083:
084: org.openide.awt.Mnemonics
085: .setLocalizedText(
086: driverDeploymentjCheckBox,
087: org.openide.util.NbBundle
088: .getMessage(CustomizerDeployment.class,
089: "CustomizerDeployment.driverDeploymentjCheckBox.text")); // NOI18N
090: driverDeploymentjCheckBox
091: .setToolTipText(org.openide.util.NbBundle
092: .getMessage(CustomizerDeployment.class,
093: "CustomizerDeployment.driverDeploymentjCheckBox.toolTipText")); // NOI18N
094: driverDeploymentjCheckBox.setBorder(javax.swing.BorderFactory
095: .createEmptyBorder(0, 0, 0, 0));
096: driverDeploymentjCheckBox.setMargin(new java.awt.Insets(0, 0,
097: 0, 0));
098: driverDeploymentjCheckBox.setModel(custData
099: .getDriverDeploymentModel());
100:
101: deploymentTimeoutSpinner.setModel(custData
102: .getDeploymentTimeoutModel());
103: deploymentTimeoutSpinner
104: .setToolTipText(org.openide.util.NbBundle
105: .getMessage(CustomizerDeployment.class,
106: "CustomizerDeployment.deplolymentTimeoutSpinner.tooltip")); // NOI18N
107: deploymentTimeoutSpinner.setEditor(new NumberEditor(
108: deploymentTimeoutSpinner, "#"));
109:
110: deplolymentTimeoutLabel.setLabelFor(deploymentTimeoutSpinner);
111: org.openide.awt.Mnemonics
112: .setLocalizedText(
113: deplolymentTimeoutLabel,
114: org.openide.util.NbBundle
115: .getMessage(CustomizerDeployment.class,
116: "CustomizerDeployment.deplolymentTimeoutLabel.text")); // NOI18N
117: deplolymentTimeoutLabel
118: .setToolTipText(org.openide.util.NbBundle
119: .getMessage(CustomizerDeployment.class,
120: "CustomizerDeployment.deplolymentTimeoutLabel.tooltip")); // NOI18N
121:
122: org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
123: this );
124: this .setLayout(layout);
125: layout
126: .setHorizontalGroup(layout
127: .createParallelGroup(
128: org.jdesktop.layout.GroupLayout.LEADING)
129: .add(
130: layout
131: .createSequentialGroup()
132: .addContainerGap()
133: .add(
134: layout
135: .createParallelGroup(
136: org.jdesktop.layout.GroupLayout.LEADING)
137: .add(
138: layout
139: .createSequentialGroup()
140: .add(
141: deplolymentTimeoutLabel)
142: .addPreferredGap(
143: org.jdesktop.layout.LayoutStyle.RELATED)
144: .add(
145: deploymentTimeoutSpinner,
146: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
147: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
148: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
149: .add(
150: driverDeploymentjCheckBox))
151: .addContainerGap(176,
152: Short.MAX_VALUE)));
153: layout
154: .setVerticalGroup(layout
155: .createParallelGroup(
156: org.jdesktop.layout.GroupLayout.LEADING)
157: .add(
158: layout
159: .createSequentialGroup()
160: .addContainerGap()
161: .add(
162: layout
163: .createParallelGroup(
164: org.jdesktop.layout.GroupLayout.BASELINE)
165: .add(
166: deplolymentTimeoutLabel)
167: .add(
168: deploymentTimeoutSpinner,
169: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
170: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
171: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
172: .addPreferredGap(
173: org.jdesktop.layout.LayoutStyle.UNRELATED)
174: .add(driverDeploymentjCheckBox)
175: .addContainerGap(241,
176: Short.MAX_VALUE)));
177:
178: driverDeploymentjCheckBox
179: .getAccessibleContext()
180: .setAccessibleName(
181: org.openide.util.NbBundle
182: .getMessage(CustomizerDeployment.class,
183: "CustomizerDeployment.driverDeploymentjCheckBox.accessible.name")); // NOI18N
184: driverDeploymentjCheckBox
185: .getAccessibleContext()
186: .setAccessibleDescription(
187: org.openide.util.NbBundle
188: .getMessage(CustomizerDeployment.class,
189: "CustomizerDeployment.driverDeploymentjCheckBox.accessible.description")); // NOI18N
190: deploymentTimeoutSpinner
191: .getAccessibleContext()
192: .setAccessibleName(
193: org.openide.util.NbBundle
194: .getMessage(CustomizerDeployment.class,
195: "CustomizerDeployment.deplolymentTimeoutSpinner.accessible.name")); // NOI18N
196: deploymentTimeoutSpinner
197: .getAccessibleContext()
198: .setAccessibleDescription(
199: org.openide.util.NbBundle
200: .getMessage(CustomizerDeployment.class,
201: "CustomizerDeployment.deplolymentTimeoutSpinner.accessible.description")); // NOI18N
202: deplolymentTimeoutLabel
203: .getAccessibleContext()
204: .setAccessibleName(
205: org.openide.util.NbBundle
206: .getMessage(CustomizerDeployment.class,
207: "CustomizerDeployment.deplolymentTimeoutLabel.accessible.name")); // NOI18N
208: deplolymentTimeoutLabel
209: .getAccessibleContext()
210: .setAccessibleDescription(
211: org.openide.util.NbBundle
212: .getMessage(CustomizerDeployment.class,
213: "CustomizerDeployment.deplolymentTimeoutLabel.accessible.description")); // NOI18N
214: }// </editor-fold>//GEN-END:initComponents
215:
216: // Variables declaration - do not modify//GEN-BEGIN:variables
217: private javax.swing.JLabel deplolymentTimeoutLabel;
218: private javax.swing.JSpinner deploymentTimeoutSpinner;
219: private javax.swing.JCheckBox driverDeploymentjCheckBox;
220: // End of variables declaration//GEN-END:variables
221:
222: }
|