KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > subversion > ui > copy > CreateCopyPanel


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.subversion.ui.copy;
21
22 import org.netbeans.modules.subversion.ui.wizards.*;
23
24 /**
25  *
26  * @author Petr Kuzel
27  */

28 public class CreateCopyPanel extends javax.swing.JPanel JavaDoc {
29
30     /** Creates new form WorkdirPanel */
31     public CreateCopyPanel() {
32         initComponents();
33     }
34
35     /** This method is called from within the constructor to
36      * initialize the form.
37      * WARNING: Do NOT modify this code. The content of this method is
38      * always regenerated by the Form Editor.
39      */

40     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
41
private void initComponents() {
42
43         buttonGroup1 = new javax.swing.ButtonGroup JavaDoc();
44         jLabel1 = new javax.swing.JLabel JavaDoc();
45         jScrollPane1 = new javax.swing.JScrollPane JavaDoc();
46         jLabel2 = new javax.swing.JLabel JavaDoc();
47         jLabel4 = new javax.swing.JLabel JavaDoc();
48         jLabel5 = new javax.swing.JLabel JavaDoc();
49         jLabel6 = new javax.swing.JLabel JavaDoc();
50         jLabel7 = new javax.swing.JLabel JavaDoc();
51
52         setName(org.openide.util.NbBundle.getMessage(CreateCopyPanel.class, "CTL_CopyForm_Name")); // NOI18N
53

54         jLabel1.setLabelFor(messageTextArea);
55         org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(CreateCopyPanel.class, "CTL_CopyForm_Description")); // NOI18N
56

57         messageTextArea.setColumns(20);
58         messageTextArea.setRows(5);
59         jScrollPane1.setViewportView(messageTextArea);
60         messageTextArea.getAccessibleContext().setAccessibleName("Copy Description");
61         messageTextArea.getAccessibleContext().setAccessibleDescription("Copy Description");
62
63         copyToLabel.setLabelFor(urlComboBox);
64         org.openide.awt.Mnemonics.setLocalizedText(copyToLabel, org.openide.util.NbBundle.getMessage(CreateCopyPanel.class, "CTL_CopyForm_toFolder")); // NOI18N
65

66         org.openide.awt.Mnemonics.setLocalizedText(browseRepositoryButton, org.openide.util.NbBundle.getMessage(CreateCopyPanel.class, "CTL_CopyForm_Browse")); // NOI18N
67

68         urlComboBox.setEditable(true);
69
70         warningLabel.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/org/netbeans/modules/subversion/ui/resources/warning.png")));
71         org.openide.awt.Mnemonics.setLocalizedText(warningLabel, org.openide.util.NbBundle.getMessage(CreateCopyPanel.class, "CTL_CopyForm_Warning")); // NOI18N
72

73         org.openide.awt.Mnemonics.setLocalizedText(switchToCheckBox, org.openide.util.NbBundle.getMessage(CreateCopyPanel.class, "CTL_CopyForm_Switch")); // NOI18N
74
switchToCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
75         switchToCheckBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
76
77         copyFromLocalTextField.setEditable(false);
78
79         org.openide.awt.Mnemonics.setLocalizedText(jLabel2, "Source:");
80
81         buttonGroup1.add(localRadioButton);
82         localRadioButton.setSelected(true);
83         org.openide.awt.Mnemonics.setLocalizedText(localRadioButton, "Local Folder/File:");
84         localRadioButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
85         localRadioButton.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
86
87         copyFromRemoteTextField.setEditable(false);
88
89         buttonGroup1.add(remoteRadioButton);
90         org.openide.awt.Mnemonics.setLocalizedText(remoteRadioButton, "Repository Folder/File:");
91         remoteRadioButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
92         remoteRadioButton.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
93
94         org.openide.awt.Mnemonics.setLocalizedText(jLabel4, "Revision:");
95
96         org.openide.awt.Mnemonics.setLocalizedText(searchButton, "Search...");
97
98         org.openide.awt.Mnemonics.setLocalizedText(jLabel5, "Destination:");
99
100         org.openide.awt.Mnemonics.setLocalizedText(skipCheckBox, org.openide.util.NbBundle.getMessage(CreateCopyPanel.class, "CTL_CopyForm_Skip")); // NOI18N
101
skipCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
102         skipCheckBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
103
104         org.openide.awt.Mnemonics.setLocalizedText(jLabel6, "(Empty means repository HEAD)");
105
106         org.openide.awt.Mnemonics.setLocalizedText(jLabel7, "Preview:");
107
108         previewTextField.setEditable(false);
109
110         invalidValuesLabel.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/org/netbeans/modules/subversion/ui/resources/error.gif")));
111         org.openide.awt.Mnemonics.setLocalizedText(invalidValuesLabel, "Error");
112
113         org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
114         this.setLayout(layout);
115         layout.setHorizontalGroup(
116             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
117             .add(layout.createSequentialGroup()
118                 .addContainerGap()
119                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
120                     .add(jLabel2)
121                     .add(layout.createSequentialGroup()
122                         .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
123                             .add(remoteRadioButton)
124                             .add(localRadioButton)
125                             .add(layout.createSequentialGroup()
126                                 .add(17, 17, 17)
127                                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
128                                     .add(jLabel4)
129                                     .add(copyFromRemoteLabel))))
130                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
131                         .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
132                             .add(layout.createSequentialGroup()
133                                 .add(copyFromRevisionTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 117, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
134                                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
135                                 .add(searchButton))
136                             .add(jLabel6)
137                             .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
138                                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
139                                     .add(org.jdesktop.layout.GroupLayout.LEADING, copyFromLocalTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 644, Short.MAX_VALUE)
140                                     .add(copyFromRemoteTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 644, Short.MAX_VALUE))
141                                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))))
142                     .add(skipCheckBox)
143                     .add(layout.createSequentialGroup()
144                         .add(copyToLabel)
145                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 688, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
146                     .add(layout.createSequentialGroup()
147                         .add(jLabel5)
148                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 739, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
149                     .add(layout.createSequentialGroup()
150                         .add(switchToCheckBox)
151                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 704, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
152                     .add(layout.createSequentialGroup()
153                         .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 702, Short.MAX_VALUE)
154                         .add(113, 113, 113))
155                     .add(layout.createSequentialGroup()
156                         .add(jLabel7)
157                         .add(85, 85, 85)
158                         .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
159                             .add(previewTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 679, Short.MAX_VALUE)
160                             .add(layout.createSequentialGroup()
161                                 .add(urlComboBox, 0, 584, Short.MAX_VALUE)
162                                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
163                                 .add(browseRepositoryButton))))
164                     .add(invalidValuesLabel)
165                     .add(org.jdesktop.layout.GroupLayout.TRAILING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 815, Short.MAX_VALUE)
166                     .add(warningLabel))
167                 .addContainerGap())
168         );
169         layout.setVerticalGroup(
170             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
171             .add(layout.createSequentialGroup()
172                 .addContainerGap()
173                 .add(jLabel2)
174                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
175                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
176                     .add(copyFromLocalTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
177                     .add(localRadioButton))
178                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
179                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
180                     .add(layout.createSequentialGroup()
181                         .add(20, 20, 20)
182                         .add(copyFromRemoteLabel))
183                     .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
184                         .add(copyFromRemoteTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
185                         .add(remoteRadioButton)))
186                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
187                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
188                     .add(copyFromRevisionTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
189                     .add(searchButton)
190                     .add(jLabel4))
191                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
192                 .add(jLabel6)
193                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
194                 .add(skipCheckBox)
195                 .add(31, 31, 31)
196                 .add(jLabel5)
197                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
198                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
199                     .add(copyToLabel)
200                     .add(urlComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
201                     .add(browseRepositoryButton))
202                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
203                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
204                     .add(jLabel7)
205                     .add(previewTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
206                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
207                 .add(switchToCheckBox)
208                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
209                 .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
210                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
211                 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)
212                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
213                 .add(invalidValuesLabel)
214                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
215                 .add(warningLabel)
216                 .addContainerGap())
217         );
218
219         jLabel1.getAccessibleContext().setAccessibleDescription("Copy Description");
220         browseRepositoryButton.getAccessibleContext().setAccessibleDescription("Browse Repository Folders");
221         switchToCheckBox.getAccessibleContext().setAccessibleDescription("Switch to new copy after creation");
222     }// </editor-fold>//GEN-END:initComponents
223

224     // Variables declaration - do not modify//GEN-BEGIN:variables
225
final javax.swing.JButton JavaDoc browseRepositoryButton = new javax.swing.JButton JavaDoc();
226     private javax.swing.ButtonGroup JavaDoc buttonGroup1;
227     final javax.swing.JTextField JavaDoc copyFromLocalTextField = new javax.swing.JTextField JavaDoc();
228     final javax.swing.JLabel JavaDoc copyFromRemoteLabel = new javax.swing.JLabel JavaDoc();
229     final javax.swing.JTextField JavaDoc copyFromRemoteTextField = new javax.swing.JTextField JavaDoc();
230     final javax.swing.JTextField JavaDoc copyFromRevisionTextField = new javax.swing.JTextField JavaDoc();
231     final javax.swing.JLabel JavaDoc copyToLabel = new javax.swing.JLabel JavaDoc();
232     final javax.swing.JLabel JavaDoc invalidValuesLabel = new javax.swing.JLabel JavaDoc();
233     private javax.swing.JLabel JavaDoc jLabel1;
234     private javax.swing.JLabel JavaDoc jLabel2;
235     private javax.swing.JLabel JavaDoc jLabel4;
236     private javax.swing.JLabel JavaDoc jLabel5;
237     private javax.swing.JLabel JavaDoc jLabel6;
238     private javax.swing.JLabel JavaDoc jLabel7;
239     private javax.swing.JScrollPane JavaDoc jScrollPane1;
240     final javax.swing.JRadioButton JavaDoc localRadioButton = new javax.swing.JRadioButton JavaDoc();
241     final javax.swing.JTextArea JavaDoc messageTextArea = new javax.swing.JTextArea JavaDoc();
242     final javax.swing.JTextField JavaDoc previewTextField = new javax.swing.JTextField JavaDoc();
243     final javax.swing.JRadioButton JavaDoc remoteRadioButton = new javax.swing.JRadioButton JavaDoc();
244     final javax.swing.JButton JavaDoc searchButton = new javax.swing.JButton JavaDoc();
245     final javax.swing.JCheckBox JavaDoc skipCheckBox = new javax.swing.JCheckBox JavaDoc();
246     final javax.swing.JCheckBox JavaDoc switchToCheckBox = new javax.swing.JCheckBox JavaDoc();
247     final javax.swing.JComboBox JavaDoc urlComboBox = new javax.swing.JComboBox JavaDoc();
248     final javax.swing.JLabel JavaDoc warningLabel = new javax.swing.JLabel JavaDoc();
249     // End of variables declaration//GEN-END:variables
250

251 }
252
Popular Tags