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: package org.netbeans.modules.subversion.ui.update;
042:
043: /**
044: *
045: * @author Tomas Stupka
046: */
047: public class RevertModificationsPanel extends javax.swing.JPanel {
048:
049: /** Creates new form ReverModificationsPanel */
050: public RevertModificationsPanel() {
051: initComponents();
052: }
053:
054: /** This method is called from within the constructor to
055: * initialize the form.
056: * WARNING: Do NOT modify this code. The content of this method is
057: * always regenerated by the Form Editor.
058: */
059: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
060: private void initComponents() {
061:
062: jLabel2 = new javax.swing.JLabel();
063: jLabel9 = new javax.swing.JLabel();
064: jLabel3 = new javax.swing.JLabel();
065: jLabel4 = new javax.swing.JLabel();
066: jLabel10 = new javax.swing.JLabel();
067:
068: buttonGroup.add(localChangesRadioButton);
069: localChangesRadioButton.setSelected(true);
070: java.util.ResourceBundle bundle = java.util.ResourceBundle
071: .getBundle("org/netbeans/modules/subversion/ui/update/Bundle"); // NOI18N
072: org.openide.awt.Mnemonics.setLocalizedText(
073: localChangesRadioButton, bundle
074: .getString("CTL_RevertPanel_RevertLocal")); // NOI18N
075: localChangesRadioButton.setBorder(javax.swing.BorderFactory
076: .createEmptyBorder(0, 0, 0, 0));
077: localChangesRadioButton.setMargin(new java.awt.Insets(0, 0, 0,
078: 0));
079:
080: buttonGroup.add(moreCommitsRadioButton);
081: org.openide.awt.Mnemonics.setLocalizedText(
082: moreCommitsRadioButton, bundle
083: .getString("CTL_RevertPanel_RevertMulti")); // NOI18N
084: moreCommitsRadioButton.setBorder(javax.swing.BorderFactory
085: .createEmptyBorder(0, 0, 0, 0));
086: moreCommitsRadioButton
087: .setMargin(new java.awt.Insets(0, 0, 0, 0));
088:
089: jLabel2.setLabelFor(startRevisionTextField);
090: org.openide.awt.Mnemonics.setLocalizedText(jLabel2, bundle
091: .getString("CTL_RevertPanel_StartingRevision")); // NOI18N
092:
093: startRevisionTextField.setEnabled(false);
094:
095: org.openide.awt.Mnemonics.setLocalizedText(startSearchButton,
096: bundle.getString("CTL_RevertPanel_Search2")); // NOI18N
097: startSearchButton.setEnabled(false);
098:
099: jLabel9.setText(bundle.getString("CTL_RevertPanel_EmptyHint")); // NOI18N
100:
101: endRevisionTextField.setEnabled(false);
102:
103: org.openide.awt.Mnemonics.setLocalizedText(endSearchButton,
104: bundle.getString("CTL_RevertPanel_Search3")); // NOI18N
105: endSearchButton.setEnabled(false);
106:
107: jLabel3.setLabelFor(endRevisionTextField);
108: org.openide.awt.Mnemonics.setLocalizedText(jLabel3, bundle
109: .getString("CTL_RevertPanel_EndingRevision")); // NOI18N
110:
111: buttonGroup.add(oneCommitRadioButton);
112: org.openide.awt.Mnemonics.setLocalizedText(
113: oneCommitRadioButton, bundle
114: .getString("CTL_RevertPanel_RevertSingle")); // NOI18N
115: oneCommitRadioButton.setBorder(javax.swing.BorderFactory
116: .createEmptyBorder(0, 0, 0, 0));
117: oneCommitRadioButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
118:
119: jLabel4.setLabelFor(oneRevisionTextField);
120: org.openide.awt.Mnemonics.setLocalizedText(jLabel4, bundle
121: .getString("CTL_RevertPanel_SingleRevision")); // NOI18N
122:
123: oneRevisionTextField.setEnabled(false);
124:
125: org.openide.awt.Mnemonics.setLocalizedText(
126: oneRevisionSearchButton, bundle
127: .getString("CTL_RevertPanel_Search1")); // NOI18N
128: oneRevisionSearchButton.setEnabled(false);
129:
130: jLabel10.setText(bundle.getString("CTL_RevertPanel_EmptyHint")); // NOI18N
131:
132: org.openide.awt.Mnemonics.setLocalizedText(
133: revertNewFilesCheckBox, org.openide.util.NbBundle
134: .getMessage(RevertModificationsPanel.class,
135: "CTL_RevertPanel_RevertNewFiles")); // NOI18N
136: revertNewFilesCheckBox.setBorder(javax.swing.BorderFactory
137: .createEmptyBorder(0, 0, 0, 0));
138: revertNewFilesCheckBox
139: .setMargin(new java.awt.Insets(0, 0, 0, 0));
140:
141: org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
142: this );
143: this .setLayout(layout);
144: layout
145: .setHorizontalGroup(layout
146: .createParallelGroup(
147: org.jdesktop.layout.GroupLayout.LEADING)
148: .add(
149: layout
150: .createSequentialGroup()
151: .addContainerGap()
152: .add(
153: layout
154: .createParallelGroup(
155: org.jdesktop.layout.GroupLayout.LEADING)
156: .add(
157: revertNewFilesCheckBox,
158: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
159: 394,
160: Short.MAX_VALUE)
161: .add(
162: moreCommitsRadioButton)
163: .add(
164: layout
165: .createSequentialGroup()
166: .add(
167: 17,
168: 17,
169: 17)
170: .add(
171: layout
172: .createParallelGroup(
173: org.jdesktop.layout.GroupLayout.LEADING,
174: false)
175: .add(
176: jLabel3,
177: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
178: 112,
179: Short.MAX_VALUE)
180: .add(
181: jLabel2,
182: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
183: 112,
184: Short.MAX_VALUE)
185: .add(
186: jLabel4,
187: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
188: 112,
189: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
190: .addPreferredGap(
191: org.jdesktop.layout.LayoutStyle.RELATED)
192: .add(
193: layout
194: .createParallelGroup(
195: org.jdesktop.layout.GroupLayout.LEADING)
196: .add(
197: jLabel10)
198: .add(
199: layout
200: .createSequentialGroup()
201: .add(
202: layout
203: .createParallelGroup(
204: org.jdesktop.layout.GroupLayout.TRAILING)
205: .add(
206: org.jdesktop.layout.GroupLayout.LEADING,
207: endRevisionTextField,
208: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
209: 164,
210: Short.MAX_VALUE)
211: .add(
212: org.jdesktop.layout.GroupLayout.LEADING,
213: startRevisionTextField,
214: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
215: 164,
216: Short.MAX_VALUE))
217: .addPreferredGap(
218: org.jdesktop.layout.LayoutStyle.RELATED)
219: .add(
220: layout
221: .createParallelGroup(
222: org.jdesktop.layout.GroupLayout.TRAILING)
223: .add(
224: startSearchButton)
225: .add(
226: endSearchButton)))
227: .add(
228: org.jdesktop.layout.GroupLayout.TRAILING,
229: layout
230: .createSequentialGroup()
231: .add(
232: oneRevisionTextField,
233: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
234: 164,
235: Short.MAX_VALUE)
236: .addPreferredGap(
237: org.jdesktop.layout.LayoutStyle.RELATED)
238: .add(
239: oneRevisionSearchButton))))
240: .add(
241: oneCommitRadioButton)
242: .add(
243: localChangesRadioButton)
244: .add(
245: layout
246: .createSequentialGroup()
247: .add(
248: 141,
249: 141,
250: 141)
251: .add(
252: jLabel9)))
253: .addContainerGap()));
254: layout
255: .setVerticalGroup(layout
256: .createParallelGroup(
257: org.jdesktop.layout.GroupLayout.LEADING)
258: .add(
259: layout
260: .createSequentialGroup()
261: .addContainerGap()
262: .add(localChangesRadioButton)
263: .addPreferredGap(
264: org.jdesktop.layout.LayoutStyle.RELATED)
265: .add(oneCommitRadioButton)
266: .addPreferredGap(
267: org.jdesktop.layout.LayoutStyle.RELATED)
268: .add(
269: layout
270: .createParallelGroup(
271: org.jdesktop.layout.GroupLayout.BASELINE)
272: .add(jLabel4)
273: .add(
274: oneRevisionSearchButton)
275: .add(
276: oneRevisionTextField,
277: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
278: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
279: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
280: .addPreferredGap(
281: org.jdesktop.layout.LayoutStyle.RELATED)
282: .add(jLabel9)
283: .addPreferredGap(
284: org.jdesktop.layout.LayoutStyle.RELATED)
285: .add(
286: moreCommitsRadioButton,
287: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
288: 15,
289: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
290: .addPreferredGap(
291: org.jdesktop.layout.LayoutStyle.RELATED)
292: .add(
293: layout
294: .createParallelGroup(
295: org.jdesktop.layout.GroupLayout.BASELINE)
296: .add(jLabel2)
297: .add(
298: startRevisionTextField,
299: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
300: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
301: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
302: .add(
303: startSearchButton))
304: .addPreferredGap(
305: org.jdesktop.layout.LayoutStyle.RELATED)
306: .add(
307: layout
308: .createParallelGroup(
309: org.jdesktop.layout.GroupLayout.BASELINE)
310: .add(jLabel3)
311: .add(
312: endRevisionTextField,
313: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
314: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
315: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
316: .add(
317: endSearchButton))
318: .addPreferredGap(
319: org.jdesktop.layout.LayoutStyle.RELATED)
320: .add(jLabel10)
321: .add(22, 22, 22)
322: .add(revertNewFilesCheckBox)
323: .addContainerGap(
324: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
325: Short.MAX_VALUE)));
326:
327: localChangesRadioButton
328: .getAccessibleContext()
329: .setAccessibleDescription(
330: bundle
331: .getString("ACSD_RevertPanel_RevertLocal")); // NOI18N
332: moreCommitsRadioButton
333: .getAccessibleContext()
334: .setAccessibleDescription(
335: bundle
336: .getString("ACSD_RevertPanel_RevertMulti")); // NOI18N
337: jLabel2.getAccessibleContext().setAccessibleDescription(
338: bundle.getString("ACSD_RevertPanel_StartingRevision")); // NOI18N
339: startSearchButton.getAccessibleContext()
340: .setAccessibleDescription(
341: bundle.getString("ACSD_RevertPanel_Search2")); // NOI18N
342: endSearchButton.getAccessibleContext()
343: .setAccessibleDescription(
344: bundle.getString("ACSD_RevertPanel_Search3")); // NOI18N
345: jLabel3.getAccessibleContext().setAccessibleDescription(
346: bundle.getString("ACSD_RevertPanel_EndingRevision")); // NOI18N
347: oneCommitRadioButton
348: .getAccessibleContext()
349: .setAccessibleDescription(
350: bundle
351: .getString("ACSD_RevertPanel_RevertSingle")); // NOI18N
352: jLabel4.getAccessibleContext().setAccessibleDescription(
353: bundle.getString("ACSD_RevertPanel_SingleRevision")); // NOI18N
354: oneRevisionSearchButton.getAccessibleContext()
355: .setAccessibleDescription(
356: bundle.getString("ACSD_RevertPanel_Search1")); // NOI18N
357: revertNewFilesCheckBox.getAccessibleContext()
358: .setAccessibleName(
359: org.openide.util.NbBundle.getMessage(
360: RevertModificationsPanel.class,
361: "ASCN_RevertPanel_RevertNewFiles")); // NOI18N
362: revertNewFilesCheckBox.getAccessibleContext()
363: .setAccessibleDescription(
364: org.openide.util.NbBundle.getMessage(
365: RevertModificationsPanel.class,
366: "ASCD_RevertPanel_RevertNewFiles")); // NOI18N
367: }// </editor-fold>//GEN-END:initComponents
368:
369: // Variables declaration - do not modify//GEN-BEGIN:variables
370: final javax.swing.ButtonGroup buttonGroup = new javax.swing.ButtonGroup();
371: final javax.swing.JTextField endRevisionTextField = new javax.swing.JTextField();
372: final javax.swing.JButton endSearchButton = new javax.swing.JButton();
373: private javax.swing.JLabel jLabel10;
374: private javax.swing.JLabel jLabel2;
375: private javax.swing.JLabel jLabel3;
376: private javax.swing.JLabel jLabel4;
377: private javax.swing.JLabel jLabel9;
378: final javax.swing.JRadioButton localChangesRadioButton = new javax.swing.JRadioButton();
379: final javax.swing.JRadioButton moreCommitsRadioButton = new javax.swing.JRadioButton();
380: final javax.swing.JRadioButton oneCommitRadioButton = new javax.swing.JRadioButton();
381: final javax.swing.JButton oneRevisionSearchButton = new javax.swing.JButton();
382: final javax.swing.JTextField oneRevisionTextField = new javax.swing.JTextField();
383: final javax.swing.JCheckBox revertNewFilesCheckBox = new javax.swing.JCheckBox();
384: final javax.swing.JTextField startRevisionTextField = new javax.swing.JTextField();
385: final javax.swing.JButton startSearchButton = new javax.swing.JButton();
386: // End of variables declaration//GEN-END:variables
387:
388: }
|