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-2006 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.mercurial.ui.repository;
043:
044: /**
045: *
046: * @author Petr Kuzel
047: */
048: public class RepositoryPanel extends javax.swing.JPanel {
049:
050: /** Creates new form RepositoryPanel */
051: public RepositoryPanel() {
052: initComponents();
053: }
054:
055: /** This method is called from within the constructor to
056: * initialize the form.
057: * WARNING: Do NOT modify this code. The content of this method is
058: * always regenerated by the Form Editor.
059: */
060: // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
061: private void initComponents() {
062:
063: setMinimumSize(new java.awt.Dimension(480, 160));
064: java.util.ResourceBundle bundle = java.util.ResourceBundle
065: .getBundle("org/netbeans/modules/mercurial/ui/repository/Bundle"); // NOI18N
066: setName(bundle.getString("BK2018")); // NOI18N
067: setVerifyInputWhenFocusTarget(false);
068:
069: titleLabel.setText(bundle.getString("BK0001")); // NOI18N
070:
071: jLabel2.setLabelFor(urlComboBox);
072: org.openide.awt.Mnemonics.setLocalizedText(jLabel2,
073: org.openide.util.NbBundle.getMessage(
074: RepositoryPanel.class, "BK0002")); // NOI18N
075:
076: urlComboBox.setEditable(true);
077:
078: org.openide.awt.Mnemonics.setLocalizedText(proxySettingsButton,
079: org.openide.util.NbBundle.getMessage(
080: RepositoryPanel.class, "BK0006")); // NOI18N
081: proxySettingsButton.setToolTipText(org.openide.util.NbBundle
082: .getMessage(RepositoryPanel.class, "ACSD_ProxyDialog")); // NOI18N
083:
084: tipLabel.setText("-"); // NOI18N
085: tipLabel.setMaximumSize(new java.awt.Dimension(32767, 32767));
086:
087: removeButton.setText(org.openide.util.NbBundle.getMessage(
088: RepositoryPanel.class, "BK0008")); // NOI18N
089:
090: userPasswordField
091: .setMinimumSize(new java.awt.Dimension(11, 22));
092: userPasswordField.setPreferredSize(new java.awt.Dimension(11,
093: 22));
094:
095: passwordLabel.setLabelFor(userPasswordField);
096: org.openide.awt.Mnemonics.setLocalizedText(passwordLabel,
097: org.openide.util.NbBundle.getMessage(
098: RepositoryPanel.class, "BK0004")); // NOI18N
099: passwordLabel.setToolTipText(org.openide.util.NbBundle
100: .getMessage(RepositoryPanel.class, "TT_Password")); // NOI18N
101:
102: userLabel.setLabelFor(userTextField);
103: org.openide.awt.Mnemonics.setLocalizedText(userLabel,
104: org.openide.util.NbBundle.getMessage(
105: RepositoryPanel.class, "BK0003")); // NOI18N
106: userLabel.setToolTipText(org.openide.util.NbBundle.getMessage(
107: RepositoryPanel.class, "TT_UserName")); // NOI18N
108:
109: userTextField.setMinimumSize(new java.awt.Dimension(11, 22));
110: userTextField.setPreferredSize(new java.awt.Dimension(11, 22));
111:
112: leaveBlankLabel.setText(org.openide.util.NbBundle.getMessage(
113: RepositoryPanel.class, "BK0005")); // NOI18N
114:
115: tunnelLabel.setText(org.openide.util.NbBundle.getMessage(
116: RepositoryPanel.class, "BK0010")); // NOI18N
117:
118: tunnelCommandLabel.setText(org.openide.util.NbBundle
119: .getMessage(RepositoryPanel.class, "BK0009")); // NOI18N
120:
121: tunnelHelpLabel.setText(org.openide.util.NbBundle.getMessage(
122: RepositoryPanel.class, "TT_svn_xxx")); // NOI18N
123:
124: savePasswordCheckBox.setMnemonic('v');
125: savePasswordCheckBox.setText(org.openide.util.NbBundle
126: .getMessage(RepositoryPanel.class, "BK0007")); // NOI18N
127: savePasswordCheckBox.setBorder(javax.swing.BorderFactory
128: .createEmptyBorder(0, 0, 0, 0));
129: savePasswordCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
130:
131: org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
132: this );
133: this .setLayout(layout);
134: layout
135: .setHorizontalGroup(layout
136: .createParallelGroup(
137: org.jdesktop.layout.GroupLayout.LEADING)
138: .add(titleLabel)
139: .add(
140: layout.createSequentialGroup().add(
141: proxySettingsButton)
142: .addContainerGap())
143: .add(
144: layout
145: .createSequentialGroup()
146: .add(
147: layout
148: .createParallelGroup(
149: org.jdesktop.layout.GroupLayout.LEADING)
150: .add(jLabel2)
151: .add(userLabel)
152: .add(
153: passwordLabel))
154: .add(38, 38, 38)
155: .add(
156: layout
157: .createParallelGroup(
158: org.jdesktop.layout.GroupLayout.LEADING)
159: .add(
160: layout
161: .createSequentialGroup()
162: .add(
163: savePasswordCheckBox)
164: .addContainerGap())
165: .add(
166: layout
167: .createParallelGroup(
168: org.jdesktop.layout.GroupLayout.LEADING)
169: .add(
170: tipLabel,
171: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
172: 541,
173: Short.MAX_VALUE)
174: .add(
175: org.jdesktop.layout.GroupLayout.TRAILING,
176: layout
177: .createSequentialGroup()
178: .addPreferredGap(
179: org.jdesktop.layout.LayoutStyle.RELATED)
180: .add(
181: urlComboBox,
182: 0,
183: 382,
184: Short.MAX_VALUE)
185: .addPreferredGap(
186: org.jdesktop.layout.LayoutStyle.RELATED)
187: .add(
188: removeButton))
189: .add(
190: layout
191: .createSequentialGroup()
192: .add(
193: layout
194: .createParallelGroup(
195: org.jdesktop.layout.GroupLayout.TRAILING,
196: false)
197: .add(
198: org.jdesktop.layout.GroupLayout.LEADING,
199: userPasswordField,
200: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
201: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
202: Short.MAX_VALUE)
203: .add(
204: org.jdesktop.layout.GroupLayout.LEADING,
205: userTextField,
206: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
207: 145,
208: Short.MAX_VALUE))
209: .addPreferredGap(
210: org.jdesktop.layout.LayoutStyle.RELATED)
211: .add(
212: leaveBlankLabel,
213: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
214: 372,
215: Short.MAX_VALUE)
216: .addContainerGap()))))
217: .add(
218: org.jdesktop.layout.GroupLayout.TRAILING,
219: layout
220: .createSequentialGroup()
221: .add(
222: layout
223: .createParallelGroup(
224: org.jdesktop.layout.GroupLayout.TRAILING)
225: .add(
226: org.jdesktop.layout.GroupLayout.LEADING,
227: tunnelHelpLabel,
228: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
229: 669,
230: Short.MAX_VALUE)
231: .add(
232: org.jdesktop.layout.GroupLayout.LEADING,
233: layout
234: .createSequentialGroup()
235: .add(
236: tunnelLabel)
237: .addPreferredGap(
238: org.jdesktop.layout.LayoutStyle.RELATED)
239: .add(
240: tunnelCommandTextField,
241: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
242: 555,
243: Short.MAX_VALUE))
244: .add(
245: org.jdesktop.layout.GroupLayout.LEADING,
246: layout
247: .createSequentialGroup()
248: .add(
249: tunnelCommandLabel)
250: .addPreferredGap(
251: org.jdesktop.layout.LayoutStyle.RELATED)))
252: .addContainerGap()));
253: layout
254: .setVerticalGroup(layout
255: .createParallelGroup(
256: org.jdesktop.layout.GroupLayout.LEADING)
257: .add(
258: layout
259: .createSequentialGroup()
260: .add(titleLabel)
261: .addPreferredGap(
262: org.jdesktop.layout.LayoutStyle.RELATED)
263: .add(
264: layout
265: .createParallelGroup(
266: org.jdesktop.layout.GroupLayout.BASELINE)
267: .add(jLabel2)
268: .add(
269: removeButton)
270: .add(
271: urlComboBox,
272: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
273: 22,
274: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
275: .addPreferredGap(
276: org.jdesktop.layout.LayoutStyle.RELATED)
277: .add(
278: tipLabel,
279: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
280: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
281: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
282: .addPreferredGap(
283: org.jdesktop.layout.LayoutStyle.RELATED)
284: .add(
285: layout
286: .createParallelGroup(
287: org.jdesktop.layout.GroupLayout.BASELINE)
288: .add(userLabel)
289: .add(
290: userTextField,
291: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
292: 22,
293: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
294: .add(
295: leaveBlankLabel))
296: .add(
297: layout
298: .createParallelGroup(
299: org.jdesktop.layout.GroupLayout.LEADING)
300: .add(
301: layout
302: .createSequentialGroup()
303: .add(
304: 2,
305: 2,
306: 2)
307: .add(
308: userPasswordField,
309: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
310: 22,
311: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
312: .add(
313: layout
314: .createSequentialGroup()
315: .addPreferredGap(
316: org.jdesktop.layout.LayoutStyle.RELATED)
317: .add(
318: passwordLabel)))
319: .add(3, 3, 3)
320: .add(savePasswordCheckBox)
321: .addPreferredGap(
322: org.jdesktop.layout.LayoutStyle.UNRELATED)
323: .add(proxySettingsButton)
324: .addPreferredGap(
325: org.jdesktop.layout.LayoutStyle.RELATED)
326: .add(tunnelCommandLabel)
327: .addPreferredGap(
328: org.jdesktop.layout.LayoutStyle.RELATED)
329: .add(
330: layout
331: .createParallelGroup(
332: org.jdesktop.layout.GroupLayout.BASELINE)
333: .add(
334: tunnelLabel)
335: .add(
336: tunnelCommandTextField,
337: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
338: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
339: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
340: .add(18, 18, 18)
341: .add(
342: tunnelHelpLabel,
343: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
344: 78,
345: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
346: .addContainerGap(48,
347: Short.MAX_VALUE)));
348:
349: titleLabel.getAccessibleContext().setAccessibleDescription(
350: org.openide.util.NbBundle.getMessage(
351: RepositoryPanel.class,
352: "ACSD_RepositoryPanel_Title")); // NOI18N
353: titleLabel.getAccessibleContext().setAccessibleParent(this );
354: jLabel2.getAccessibleContext().setAccessibleParent(this );
355: urlComboBox.getAccessibleContext().setAccessibleName(
356: org.openide.util.NbBundle.getMessage(
357: RepositoryPanel.class, "ACSN_RepositoryURL")); // NOI18N
358: urlComboBox.getAccessibleContext().setAccessibleDescription(
359: org.openide.util.NbBundle.getMessage(
360: RepositoryPanel.class, "ACSD_RepositoryURL")); // NOI18N
361: urlComboBox.getAccessibleContext().setAccessibleParent(this );
362: proxySettingsButton.getAccessibleContext().setAccessibleParent(
363: this );
364: removeButton.getAccessibleContext().setAccessibleName(
365: org.openide.util.NbBundle.getMessage(
366: RepositoryPanel.class, "ACSN_RemoveHistory")); // NOI18N
367: removeButton.getAccessibleContext().setAccessibleDescription(
368: org.openide.util.NbBundle.getMessage(
369: RepositoryPanel.class, "ACSD_RemoveHistory")); // NOI18N
370: userPasswordField.getAccessibleContext().setAccessibleParent(
371: this );
372: passwordLabel.getAccessibleContext().setAccessibleParent(this );
373: userLabel.getAccessibleContext().setAccessibleParent(this );
374: userTextField.getAccessibleContext().setAccessibleParent(this );
375: leaveBlankLabel.getAccessibleContext()
376: .setAccessibleDescription(
377: org.openide.util.NbBundle
378: .getMessage(RepositoryPanel.class,
379: "ACSD_InfoLabel")); // NOI18N
380: leaveBlankLabel.getAccessibleContext()
381: .setAccessibleParent(this );
382: savePasswordCheckBox.getAccessibleContext()
383: .setAccessibleDescription(
384: org.openide.util.NbBundle.getMessage(
385: RepositoryPanel.class, "BK0011")); // NOI18N
386:
387: getAccessibleContext().setAccessibleDescription(
388: org.openide.util.NbBundle.getMessage(
389: RepositoryPanel.class, "ACSD_RepositoryPanel")); // NOI18N
390: }// </editor-fold>//GEN-END:initComponents
391:
392: // Variables declaration - do not modify//GEN-BEGIN:variables
393: private final javax.swing.JLabel jLabel2 = new javax.swing.JLabel();
394: final javax.swing.JLabel leaveBlankLabel = new javax.swing.JLabel();
395: final javax.swing.JLabel passwordLabel = new javax.swing.JLabel();
396: final javax.swing.JButton proxySettingsButton = new javax.swing.JButton();
397: final javax.swing.JButton removeButton = new javax.swing.JButton();
398: final javax.swing.JCheckBox savePasswordCheckBox = new javax.swing.JCheckBox();
399: final javax.swing.JLabel tipLabel = new javax.swing.JLabel();
400: final javax.swing.JLabel titleLabel = new javax.swing.JLabel();
401: final javax.swing.JLabel tunnelCommandLabel = new javax.swing.JLabel();
402: final javax.swing.JTextField tunnelCommandTextField = new javax.swing.JTextField();
403: final javax.swing.JLabel tunnelHelpLabel = new javax.swing.JLabel();
404: final javax.swing.JLabel tunnelLabel = new javax.swing.JLabel();
405: final javax.swing.JComboBox urlComboBox = new javax.swing.JComboBox();
406: final javax.swing.JLabel userLabel = new javax.swing.JLabel();
407: final javax.swing.JPasswordField userPasswordField = new javax.swing.JPasswordField();
408: final javax.swing.JTextField userTextField = new javax.swing.JTextField();
409: // End of variables declaration//GEN-END:variables
410:
411: }
|