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.options;
042:
043: /**
044: *
045: * @author Tomas Stupka
046: */
047: public class AnnotationSettingsPanel extends javax.swing.JPanel {
048:
049: /** Creates new form AnnotationSettingsPanel */
050: public AnnotationSettingsPanel() {
051: initComponents();
052: initModel();
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: org.openide.awt.Mnemonics.setLocalizedText(resetButton,
064: org.openide.util.NbBundle.getMessage(
065: AnnotationSettingsPanel.class,
066: "AnnotationSettingsPanel.resetButton.text")); // NOI18N
067:
068: tableLabel.setLabelFor(expresionsTable);
069: tableLabel.setText(org.openide.util.NbBundle.getMessage(
070: AnnotationSettingsPanel.class,
071: "AnnotationSettingsPanel.tableLabel.text")); // NOI18N
072:
073: org.openide.awt.Mnemonics.setLocalizedText(upButton,
074: org.openide.util.NbBundle.getMessage(
075: AnnotationSettingsPanel.class,
076: "AnnotationSettingsPanel.upButton.text")); // NOI18N
077:
078: org.openide.awt.Mnemonics.setLocalizedText(downButton,
079: org.openide.util.NbBundle.getMessage(
080: AnnotationSettingsPanel.class,
081: "AnnotationSettingsPanel.downButton.text")); // NOI18N
082:
083: org.openide.awt.Mnemonics.setLocalizedText(newButton,
084: org.openide.util.NbBundle.getMessage(
085: AnnotationSettingsPanel.class,
086: "AnnotationSettingsPanel.newButton.text")); // NOI18N
087:
088: org.openide.awt.Mnemonics.setLocalizedText(removeButton,
089: org.openide.util.NbBundle.getMessage(
090: AnnotationSettingsPanel.class,
091: "AnnotationSettingsPanel.removeButton.text")); // NOI18N
092:
093: expressionsPane
094: .setBackground(new java.awt.Color(255, 255, 255));
095: expressionsPane.setViewportView(expresionsTable);
096: expresionsTable.getAccessibleContext().setAccessibleName(
097: org.openide.util.NbBundle.getMessage(
098: AnnotationSettingsPanel.class,
099: "ACSN_LablesTable")); // NOI18N
100: expresionsTable.getAccessibleContext()
101: .setAccessibleDescription(
102: org.openide.util.NbBundle.getMessage(
103: AnnotationSettingsPanel.class,
104: "ACSD_LablesTable")); // NOI18N
105:
106: warningLabel.setForeground(new java.awt.Color(255, 0, 0));
107: warningLabel.setText(org.openide.util.NbBundle.getMessage(
108: AnnotationSettingsPanel.class,
109: "AnnotationSettingsPanel.warningLabel.text")); // NOI18N
110:
111: org.openide.awt.Mnemonics.setLocalizedText(wizardButton,
112: org.openide.util.NbBundle.getMessage(
113: AnnotationSettingsPanel.class,
114: "AnnotationSettingsPanel.wizardButton.text")); // NOI18N
115:
116: org.openide.awt.Mnemonics.setLocalizedText(editButton,
117: org.openide.util.NbBundle.getMessage(
118: AnnotationSettingsPanel.class,
119: "AnnotationSettingsPanel.editButton.text")); // NOI18N
120:
121: org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
122: this );
123: this .setLayout(layout);
124: layout
125: .setHorizontalGroup(layout
126: .createParallelGroup(
127: org.jdesktop.layout.GroupLayout.LEADING)
128: .add(
129: layout
130: .createSequentialGroup()
131: .addContainerGap()
132: .add(
133: layout
134: .createParallelGroup(
135: org.jdesktop.layout.GroupLayout.LEADING)
136: .add(
137: layout
138: .createSequentialGroup()
139: .add(
140: layout
141: .createParallelGroup(
142: org.jdesktop.layout.GroupLayout.LEADING)
143: .add(
144: expressionsPane,
145: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
146: 506,
147: Short.MAX_VALUE)
148: .add(
149: layout
150: .createSequentialGroup()
151: .add(
152: tableLabel)
153: .add(
154: 270,
155: 270,
156: 270)))
157: .addPreferredGap(
158: org.jdesktop.layout.LayoutStyle.RELATED)
159: .add(
160: layout
161: .createParallelGroup(
162: org.jdesktop.layout.GroupLayout.LEADING,
163: false)
164: .add(
165: upButton,
166: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
167: 141,
168: Short.MAX_VALUE)
169: .add(
170: removeButton,
171: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
172: 141,
173: Short.MAX_VALUE)
174: .add(
175: editButton,
176: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
177: 141,
178: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
179: .add(
180: wizardButton,
181: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
182: 141,
183: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
184: .add(
185: newButton,
186: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
187: 141,
188: Short.MAX_VALUE)
189: .add(
190: downButton,
191: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
192: 141,
193: Short.MAX_VALUE)))
194: .add(
195: layout
196: .createSequentialGroup()
197: .add(
198: resetButton)
199: .addPreferredGap(
200: org.jdesktop.layout.LayoutStyle.RELATED)
201: .add(
202: warningLabel,
203: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
204: 499,
205: Short.MAX_VALUE)))
206: .addContainerGap()));
207: layout
208: .setVerticalGroup(layout
209: .createParallelGroup(
210: org.jdesktop.layout.GroupLayout.LEADING)
211: .add(
212: layout
213: .createSequentialGroup()
214: .addContainerGap()
215: .add(tableLabel)
216: .addPreferredGap(
217: org.jdesktop.layout.LayoutStyle.RELATED)
218: .add(
219: layout
220: .createParallelGroup(
221: org.jdesktop.layout.GroupLayout.LEADING)
222: .add(
223: org.jdesktop.layout.GroupLayout.TRAILING,
224: layout
225: .createSequentialGroup()
226: .add(
227: newButton)
228: .addPreferredGap(
229: org.jdesktop.layout.LayoutStyle.RELATED)
230: .add(
231: wizardButton)
232: .addPreferredGap(
233: org.jdesktop.layout.LayoutStyle.RELATED)
234: .add(
235: editButton)
236: .addPreferredGap(
237: org.jdesktop.layout.LayoutStyle.RELATED)
238: .add(
239: removeButton)
240: .addPreferredGap(
241: org.jdesktop.layout.LayoutStyle.RELATED,
242: 30,
243: Short.MAX_VALUE)
244: .add(
245: upButton)
246: .addPreferredGap(
247: org.jdesktop.layout.LayoutStyle.RELATED)
248: .add(
249: downButton))
250: .add(
251: expressionsPane,
252: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
253: 204,
254: Short.MAX_VALUE))
255: .add(6, 6, 6)
256: .add(
257: layout
258: .createParallelGroup(
259: org.jdesktop.layout.GroupLayout.TRAILING)
260: .add(
261: resetButton)
262: .add(
263: warningLabel))
264: .addContainerGap()));
265:
266: resetButton.getAccessibleContext().setAccessibleName(
267: org.openide.util.NbBundle.getMessage(
268: AnnotationSettingsPanel.class, "ACSN_Reset")); // NOI18N
269: resetButton.getAccessibleContext().setAccessibleDescription(
270: org.openide.util.NbBundle.getMessage(
271: AnnotationSettingsPanel.class, "ACSD_Reset")); // NOI18N
272: newButton.getAccessibleContext().setAccessibleName(
273: org.openide.util.NbBundle.getMessage(
274: AnnotationSettingsPanel.class, "ACSN_Add")); // NOI18N
275: newButton.getAccessibleContext().setAccessibleDescription(
276: org.openide.util.NbBundle.getMessage(
277: AnnotationSettingsPanel.class, "ACSD_Add")); // NOI18N
278: wizardButton.getAccessibleContext().setAccessibleName(
279: org.openide.util.NbBundle
280: .getMessage(AnnotationSettingsPanel.class,
281: "ACSN_AddWizard")); // NOI18N
282: wizardButton.getAccessibleContext().setAccessibleDescription(
283: org.openide.util.NbBundle
284: .getMessage(AnnotationSettingsPanel.class,
285: "ACSD_AddWizard")); // NOI18N
286: }// </editor-fold>//GEN-END:initComponents
287:
288: private void initModel() {
289: expresionsTable
290: .setModel(new javax.swing.table.DefaultTableModel(
291: new Object[][] { { "", "" } },
292: new String[] {
293: org.openide.util.NbBundle
294: .getMessage(
295: AnnotationSettingsPanel.class,
296: "AnnotationSettingsPanel.expresionsTable.column1.name"),
297: org.openide.util.NbBundle
298: .getMessage(
299: AnnotationSettingsPanel.class,
300: "AnnotationSettingsPanel.expresionsTable.column2.name") }) {
301: Class[] types = new Class[] {
302: java.lang.String.class,
303: java.lang.String.class };
304:
305: public Class getColumnClass(int columnIndex) {
306: return types[columnIndex];
307: }
308: });
309: }
310:
311: // Variables declaration - do not modify//GEN-BEGIN:variables
312: final javax.swing.JButton downButton = new javax.swing.JButton();
313: final javax.swing.JButton editButton = new javax.swing.JButton();
314: final javax.swing.JTable expresionsTable = new javax.swing.JTable();
315: final javax.swing.JScrollPane expressionsPane = new javax.swing.JScrollPane();
316: final javax.swing.JButton newButton = new javax.swing.JButton();
317: final javax.swing.JButton removeButton = new javax.swing.JButton();
318: final javax.swing.JButton resetButton = new javax.swing.JButton();
319: final javax.swing.JLabel tableLabel = new javax.swing.JLabel();
320: final javax.swing.JButton upButton = new javax.swing.JButton();
321: final javax.swing.JLabel warningLabel = new javax.swing.JLabel();
322: final javax.swing.JButton wizardButton = new javax.swing.JButton();
323: // End of variables declaration//GEN-END:variables
324:
325: }
|