KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > apisupport > project > ui > wizard > action > NameIconLocationPanel


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.apisupport.project.ui.wizard.action;
21
22 import java.awt.Component JavaDoc;
23 import java.io.File JavaDoc;
24 import java.util.HashSet JavaDoc;
25 import java.util.Iterator JavaDoc;
26 import java.util.Set JavaDoc;
27 import javax.swing.JFileChooser JavaDoc;
28 import javax.swing.JTextField JavaDoc;
29 import javax.swing.event.DocumentEvent JavaDoc;
30 import javax.swing.event.DocumentListener JavaDoc;
31 import javax.swing.text.JTextComponent JavaDoc;
32 import org.netbeans.api.project.ProjectUtils;
33 import org.netbeans.modules.apisupport.project.CreatedModifiedFiles;
34 import org.netbeans.modules.apisupport.project.ui.UIUtil;
35 import org.netbeans.modules.apisupport.project.ui.wizard.BasicWizardIterator;
36 import org.openide.WizardDescriptor;
37 import org.openide.util.HelpCtx;
38 import org.openide.util.NbBundle;
39 import org.openide.util.Utilities;
40
41 /**
42  * The thrid panel in the <em>New Action Wizard</em>.
43  *
44  * @author Martin Krauskopf
45  */

46 final class NameIconLocationPanel extends BasicWizardIterator.Panel {
47     
48     private static final String JavaDoc ENTER_LABEL = getMessage("CTL_EnterLabel");
49     private static final String JavaDoc NONE_LABEL = getMessage("CTL_None");
50     
51     private final DataModel data;
52     private final DocumentListener JavaDoc updateListener;
53     
54     private String JavaDoc smallIconPath;
55     private String JavaDoc largeIconPath;
56     
57     /** Creates new NameIconLocationPanel */
58     public NameIconLocationPanel(final WizardDescriptor setting, final DataModel data) {
59         super(setting);
60         this.data = data;
61         initComponents();
62         initAccessibility();
63         if (data.getPackageName() != null) {
64             packageName.setSelectedItem(data.getPackageName());
65         }
66         putClientProperty("NewFileWizard_Title", getMessage("LBL_ActionWizardTitle"));
67         className.select(0, className.getText().length());
68         updateListener = new UIUtil.DocumentAdapter() {
69             public void insertUpdate(DocumentEvent JavaDoc e) {
70                 updateData();
71             }
72         };
73     }
74     
75     private void addListeners() {
76         className.getDocument().addDocumentListener(updateListener);
77         displayName.getDocument().addDocumentListener(updateListener);
78         Component JavaDoc editorComp = packageName.getEditor().getEditorComponent();
79         if (editorComp instanceof JTextComponent JavaDoc) {
80             ((JTextComponent JavaDoc) editorComp).getDocument().addDocumentListener(updateListener);
81         }
82     }
83     
84     private void removeListeners() {
85         className.getDocument().removeDocumentListener(updateListener);
86         displayName.getDocument().removeDocumentListener(updateListener);
87         Component JavaDoc editorComp = packageName.getEditor().getEditorComponent();
88         if (editorComp instanceof JTextComponent JavaDoc) {
89             ((JTextComponent JavaDoc) editorComp).getDocument().removeDocumentListener(updateListener);
90         }
91     }
92     
93     protected String JavaDoc getPanelName() {
94         return getMessage("LBL_NameIconLocation_Title");
95     }
96     
97     protected void storeToDataModel() {
98         removeListeners();
99         storeBaseData();
100     }
101     
102     protected void readFromDataModel() {
103         updateData();
104         addListeners();
105     }
106     
107     private void updateData() {
108         storeBaseData();
109         if (checkValidity()) {
110             CreatedModifiedFiles files = data.getCreatedModifiedFiles();
111             createdFiles.setText(UIUtil.generateTextAreaContent(files.getCreatedPaths()));
112             modifiedFiles.setText(UIUtil.generateTextAreaContent(files.getModifiedPaths()));
113         }
114     }
115     
116     /** Data needed to compute CMF. ClassName, packageName, icon. */
117     private void storeBaseData() {
118         data.setClassName(getClassName());
119         data.setPackageName(packageName.getEditor().getItem().toString());
120         data.setIconPath(smallIconPath);
121         data.setLargeIconPath(largeIconPath);
122         data.setDisplayName(displayName.getText());
123     }
124     
125     private String JavaDoc getIconPath() {
126         return icon.getText().equals(NONE_LABEL) ? null : icon.getText();
127     }
128     
129     private boolean checkValidity() {
130         String JavaDoc pName = packageName.getEditor().getItem() == null ? "" : packageName.getEditor().getItem().toString().trim();
131         if (!Utilities.isJavaIdentifier(getClassName())) {
132             setError(getMessage("MSG_ClassNameMustBeValidJavaIdentifier"));
133         } else if (getDisplayName().equals("") || getDisplayName().equals(ENTER_LABEL)) {
134             setError(getMessage("MSG_DisplayNameMustBeEntered"));
135         } else if (pName.length() == 0 || !UIUtil.isValidPackageName(pName)) {
136             setError(getMessage("ERR_Package_Invalid"));
137         } else if (classAlreadyExists()) {
138             setError(getMessage("MSG_ClassAlreadyExists"));
139         } else if (data.isToolbarEnabled() && getIconPath() == null) {
140             setError(getMessage("MSG_IconRequiredForToolbar"));
141         } else {
142             markValid();
143             checkIconValidity();
144             return true;
145         }
146         return false;
147     }
148
149     private void checkIconValidity() {
150         if (smallIconPath == null) {
151             setWarning(UIUtil.getNoIconSelectedWarning(16,16));
152         } else if (!UIUtil.isValidIcon(new File JavaDoc(smallIconPath),16,16)) {
153             setWarning(UIUtil.getIconDimensionWarning(new File JavaDoc(smallIconPath), 16, 16));
154         } else if (data.isToolbarEnabled() && largeIconPath == null) {
155             File JavaDoc smallIconFile = new File JavaDoc(smallIconPath);
156             assert smallIconFile.getParentFile() != null;
157             String JavaDoc name = getName(smallIconFile);
158             String JavaDoc ext = getExt(smallIconFile);
159             StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
160             sb.append(name).append("24"); // NOI18N
161
if (ext != null) {
162                 sb.append('.').append(ext);
163             }
164             setWarning(NbBundle.getMessage(NameIconLocationPanel.class,
165                     "MSG_NoLargeIconSelected", sb.toString(), smallIconFile.getParent())); // NOI18N
166
}
167     }
168
169     private static String JavaDoc getName(final File JavaDoc smallIconFile) {
170         String JavaDoc name = smallIconFile.getName();
171         int i = name.lastIndexOf('.');
172         return (i <= 0) ? name : name.substring(0, i);
173     }
174
175     private static String JavaDoc getExt(final File JavaDoc smallIconFile) {
176         String JavaDoc name = smallIconFile.getName();
177         int i = name.lastIndexOf('.') + 1;
178         return ((i <= 1) || (i == name.length())) ? "" : name.substring(i);
179     }
180     
181     private static Set JavaDoc getPossibleIcons(final String JavaDoc iconPath) {
182         File JavaDoc icon = new File JavaDoc(iconPath);
183         String JavaDoc[] resultSuffixes = { "16", "24", "" }; // NOI18N
184
Set JavaDoc results = new HashSet JavaDoc();
185         String JavaDoc iconName = icon.getName();
186         int idx = iconName.lastIndexOf('.');
187         String JavaDoc name = (idx != -1) ? iconName.substring(0,idx) : iconName;
188         String JavaDoc extension = (idx != -1) ? iconName.substring(idx+1) : null;
189         boolean hasSuffix = (name.endsWith("24")) || (name.endsWith("16"));//NOI18N
190
name = hasSuffix ? name.substring(0,name.length()-2) : name;
191         for (int i = 0; i < resultSuffixes.length; i++) {
192             String JavaDoc resultSuffix = resultSuffixes[i];
193             String JavaDoc resultName = name + resultSuffix;
194             if (extension != null) {
195                 resultName = resultName + '.' + extension;
196             }
197             File JavaDoc f = new File JavaDoc(icon.getParentFile(),resultName);
198             if (f.exists()) {
199                 results.add(f);
200             }
201         }
202         return results;
203     }
204     
205     private boolean classAlreadyExists() {
206         return data.classExists();
207     }
208     
209     private String JavaDoc getDisplayName() {
210         return displayName.getText().trim();
211     }
212     
213     private String JavaDoc getClassName() {
214         return className.getText().trim();
215     }
216     
217     protected HelpCtx getHelp() {
218         return new HelpCtx(NameIconLocationPanel.class);
219     }
220     
221     private static String JavaDoc getMessage(String JavaDoc key) {
222         return NbBundle.getMessage(NameIconLocationPanel.class, key);
223     }
224     
225     /** This method is called from within the constructor to
226      * initialize the form.
227      * WARNING: Do NOT modify this code. The content of this method is
228      * always regenerated by the Form Editor.
229      */

230     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
231
private void initComponents() {
232         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
233
234         classNameTxt = new javax.swing.JLabel JavaDoc();
235         className = new javax.swing.JTextField JavaDoc();
236         displayNameTxt = new javax.swing.JLabel JavaDoc();
237         displayName = new javax.swing.JTextField JavaDoc();
238         iconTxt = new javax.swing.JLabel JavaDoc();
239         icon = new javax.swing.JTextField JavaDoc();
240         iconButton = new javax.swing.JButton JavaDoc();
241         projectTxt = new javax.swing.JLabel JavaDoc();
242         project = new JTextField JavaDoc(ProjectUtils.getInformation(data.getProject()).getDisplayName());
243         packageNameTxt = new javax.swing.JLabel JavaDoc();
244         packageName = UIUtil.createPackageComboBox(data.getSourceRootGroup());
245         createdFilesTxt = new javax.swing.JLabel JavaDoc();
246         createdFiles = new javax.swing.JTextArea JavaDoc();
247         modifiedFilesTxt = new javax.swing.JLabel JavaDoc();
248         modifiedFiles = new javax.swing.JTextArea JavaDoc();
249
250         setLayout(new java.awt.GridBagLayout JavaDoc());
251
252         classNameTxt.setLabelFor(className);
253         org.openide.awt.Mnemonics.setLocalizedText(classNameTxt, org.openide.util.NbBundle.getMessage(NameIconLocationPanel.class, "LBL_ClassName"));
254         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
255         gridBagConstraints.gridx = 0;
256         gridBagConstraints.gridy = 0;
257         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
258         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 6, 12);
259         add(classNameTxt, gridBagConstraints);
260
261         className.setText(org.openide.util.NbBundle.getMessage(NameIconLocationPanel.class, "CTL_SampleClassName"));
262         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
263         gridBagConstraints.gridx = 1;
264         gridBagConstraints.gridy = 0;
265         gridBagConstraints.gridwidth = 2;
266         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
267         gridBagConstraints.weightx = 1.0;
268         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 6, 0);
269         add(className, gridBagConstraints);
270
271         displayNameTxt.setLabelFor(displayName);
272         org.openide.awt.Mnemonics.setLocalizedText(displayNameTxt, org.openide.util.NbBundle.getMessage(NameIconLocationPanel.class, "LBL_DisplayName"));
273         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
274         gridBagConstraints.gridx = 0;
275         gridBagConstraints.gridy = 1;
276         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
277         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 6, 12);
278         add(displayNameTxt, gridBagConstraints);
279
280         displayName.setText(org.openide.util.NbBundle.getMessage(NameIconLocationPanel.class, "CTL_EnterLabel"));
281         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
282         gridBagConstraints.gridx = 1;
283         gridBagConstraints.gridy = 1;
284         gridBagConstraints.gridwidth = 2;
285         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
286         gridBagConstraints.weightx = 1.0;
287         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 6, 0);
288         add(displayName, gridBagConstraints);
289
290         iconTxt.setLabelFor(icon);
291         org.openide.awt.Mnemonics.setLocalizedText(iconTxt, org.openide.util.NbBundle.getMessage(NameIconLocationPanel.class, "LBL_Icon"));
292         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
293         gridBagConstraints.gridx = 0;
294         gridBagConstraints.gridy = 2;
295         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
296         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 0, 0, 12);
297         add(iconTxt, gridBagConstraints);
298
299         icon.setEditable(false);
300         icon.setText(org.openide.util.NbBundle.getMessage(NameIconLocationPanel.class, "CTL_None"));
301         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
302         gridBagConstraints.gridx = 1;
303         gridBagConstraints.gridy = 2;
304         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
305         gridBagConstraints.weightx = 1.0;
306         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 0, 0, 0);
307         add(icon, gridBagConstraints);
308
309         org.openide.awt.Mnemonics.setLocalizedText(iconButton, org.openide.util.NbBundle.getMessage(NameIconLocationPanel.class, "LBL_Icon_Browse"));
310         iconButton.addActionListener(new java.awt.event.ActionListener JavaDoc() {
311             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
312                 iconButtonActionPerformed(evt);
313             }
314         });
315
316         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
317         gridBagConstraints.gridx = 2;
318         gridBagConstraints.gridy = 2;
319         gridBagConstraints.insets = new java.awt.Insets JavaDoc(12, 12, 0, 0);
320         add(iconButton, gridBagConstraints);
321
322         projectTxt.setLabelFor(project);
323         org.openide.awt.Mnemonics.setLocalizedText(projectTxt, org.openide.util.NbBundle.getMessage(NameIconLocationPanel.class, "LBL_ProjectName"));
324         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
325         gridBagConstraints.gridx = 0;
326         gridBagConstraints.gridy = 3;
327         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
328         gridBagConstraints.insets = new java.awt.Insets JavaDoc(18, 0, 6, 12);
329         add(projectTxt, gridBagConstraints);
330
331         project.setEditable(false);
332         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
333         gridBagConstraints.gridx = 1;
334         gridBagConstraints.gridy = 3;
335         gridBagConstraints.gridwidth = 2;
336         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
337         gridBagConstraints.weightx = 1.0;
338         gridBagConstraints.insets = new java.awt.Insets JavaDoc(18, 0, 6, 0);
339         add(project, gridBagConstraints);
340
341         packageNameTxt.setLabelFor(packageName);
342         org.openide.awt.Mnemonics.setLocalizedText(packageNameTxt, org.openide.util.NbBundle.getMessage(NameIconLocationPanel.class, "LBL_PackageName"));
343         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
344         gridBagConstraints.gridx = 0;
345         gridBagConstraints.gridy = 4;
346         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
347         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 0, 12);
348         add(packageNameTxt, gridBagConstraints);
349
350         packageName.setEditable(true);
351         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
352         gridBagConstraints.gridx = 1;
353         gridBagConstraints.gridy = 4;
354         gridBagConstraints.gridwidth = 2;
355         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
356         gridBagConstraints.weightx = 1.0;
357         add(packageName, gridBagConstraints);
358
359         createdFilesTxt.setLabelFor(createdFiles);
360         org.openide.awt.Mnemonics.setLocalizedText(createdFilesTxt, org.openide.util.NbBundle.getMessage(NameIconLocationPanel.class, "LBL_CreatedFiles"));
361         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
362         gridBagConstraints.gridx = 0;
363         gridBagConstraints.gridy = 5;
364         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
365         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
366         gridBagConstraints.weighty = 0.5;
367         gridBagConstraints.insets = new java.awt.Insets JavaDoc(36, 0, 6, 12);
368         add(createdFilesTxt, gridBagConstraints);
369
370         createdFiles.setBackground(javax.swing.UIManager.getDefaults().getColor("Label.background"));
371         createdFiles.setColumns(20);
372         createdFiles.setEditable(false);
373         createdFiles.setRows(5);
374         createdFiles.setBorder(null);
375         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
376         gridBagConstraints.gridx = 1;
377         gridBagConstraints.gridy = 5;
378         gridBagConstraints.gridwidth = 2;
379         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
380         gridBagConstraints.weightx = 1.0;
381         gridBagConstraints.weighty = 0.5;
382         gridBagConstraints.insets = new java.awt.Insets JavaDoc(36, 0, 6, 0);
383         add(createdFiles, gridBagConstraints);
384
385         modifiedFilesTxt.setLabelFor(modifiedFiles);
386         org.openide.awt.Mnemonics.setLocalizedText(modifiedFilesTxt, org.openide.util.NbBundle.getMessage(NameIconLocationPanel.class, "LBL_ModifiedFiles"));
387         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
388         gridBagConstraints.gridx = 0;
389         gridBagConstraints.gridy = 6;
390         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
391         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
392         gridBagConstraints.weighty = 0.5;
393         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 0, 12);
394         add(modifiedFilesTxt, gridBagConstraints);
395
396         modifiedFiles.setBackground(javax.swing.UIManager.getDefaults().getColor("Label.background"));
397         modifiedFiles.setColumns(20);
398         modifiedFiles.setEditable(false);
399         modifiedFiles.setRows(5);
400         modifiedFiles.setToolTipText("modifiedFilesValue");
401         modifiedFiles.setBorder(null);
402         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
403         gridBagConstraints.gridx = 1;
404         gridBagConstraints.gridy = 6;
405         gridBagConstraints.gridwidth = 2;
406         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
407         gridBagConstraints.weightx = 1.0;
408         gridBagConstraints.weighty = 0.5;
409         add(modifiedFiles, gridBagConstraints);
410
411     }
412     // </editor-fold>//GEN-END:initComponents
413

414     private void iconButtonActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_iconButtonActionPerformed
415
JFileChooser JavaDoc chooser = UIUtil.getIconFileChooser(icon.getText());
416         int ret = chooser.showDialog(this, getMessage("LBL_Select"));
417         if (ret == JFileChooser.APPROVE_OPTION) {
418             File JavaDoc iconFile = chooser.getSelectedFile();
419             icon.setText(iconFile.getAbsolutePath());
420             {
421                 Set JavaDoc allFiles = getPossibleIcons(getIconPath());
422                 assert allFiles.contains(iconFile);
423                 allFiles.remove(iconFile);
424                 boolean isIconSmall = UIUtil.isValidIcon(iconFile, 16, 16);
425  
426                 File JavaDoc secondIcon = null;
427                 boolean isSecondIconSmall = false;
428                 for (Iterator JavaDoc it = allFiles.iterator(); it.hasNext() && !isSecondIconSmall;) {
429                     File JavaDoc f = (File JavaDoc) it.next();
430                     isSecondIconSmall = (isIconSmall) ?
431                         UIUtil.isValidIcon(f, 24, 24) : UIUtil.isValidIcon(f, 16, 16);
432                     if (isSecondIconSmall) {
433                         secondIcon = f;
434                         break;
435                     }
436                 }
437                 
438                 if (secondIcon != null) {
439                     smallIconPath = (isIconSmall) ? iconFile.getAbsolutePath() : secondIcon.getAbsolutePath();
440                     largeIconPath = (isIconSmall) ? secondIcon.getAbsolutePath() : iconFile.getAbsolutePath();
441                 } else {
442                     smallIconPath = iconFile.getAbsolutePath();
443                     largeIconPath = null;
444                 }
445                 
446             }
447             updateData();
448         }
449     }//GEN-LAST:event_iconButtonActionPerformed
450

451     
452     // Variables declaration - do not modify//GEN-BEGIN:variables
453
private javax.swing.JTextField JavaDoc className;
454     private javax.swing.JLabel JavaDoc classNameTxt;
455     private javax.swing.JTextArea JavaDoc createdFiles;
456     private javax.swing.JLabel JavaDoc createdFilesTxt;
457     private javax.swing.JTextField JavaDoc displayName;
458     private javax.swing.JLabel JavaDoc displayNameTxt;
459     private javax.swing.JTextField JavaDoc icon;
460     private javax.swing.JButton JavaDoc iconButton;
461     private javax.swing.JLabel JavaDoc iconTxt;
462     private javax.swing.JTextArea JavaDoc modifiedFiles;
463     private javax.swing.JLabel JavaDoc modifiedFilesTxt;
464     private javax.swing.JComboBox JavaDoc packageName;
465     private javax.swing.JLabel JavaDoc packageNameTxt;
466     private javax.swing.JTextField JavaDoc project;
467     private javax.swing.JLabel JavaDoc projectTxt;
468     // End of variables declaration//GEN-END:variables
469

470     private void initAccessibility() {
471         this.getAccessibleContext().setAccessibleDescription(getMessage("ACS_NameAndLocationPanel"));
472         className.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ClassName"));
473         createdFiles.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_CreatedFiles"));
474         displayName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_DisplayName"));
475         icon.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_Icon"));
476         iconButton.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_IconButton"));
477         modifiedFiles.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ModifiedFiles"));
478         packageName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_PackageName"));
479         project.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_Project"));
480     }
481     
482 }
483
Popular Tags