Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.app / org.gvsig.app.mainplugin / src / main / java / org / gvsig / app / extension / develtools / IconThemeDevelTool.java @ 47411

History | View | Annotate | Download (21.9 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.app.extension.develtools;
25

    
26
import java.io.File;
27
import java.util.ArrayList;
28
import java.util.Collections;
29
import java.util.Comparator;
30
import java.util.HashSet;
31
import java.util.Iterator;
32
import java.util.List;
33
import java.util.Set;
34
import javax.swing.ImageIcon;
35
import javax.swing.JOptionPane;
36
import org.gvsig.andami.PluginsLocator;
37
import org.gvsig.andami.actioninfo.ActionInfo;
38
import org.gvsig.desktopopen.DesktopOpen;
39
import org.gvsig.tools.ToolsLocator;
40
import org.gvsig.tools.exception.BaseException;
41
import org.gvsig.tools.folders.FoldersManager;
42
import org.gvsig.tools.i18n.I18nManager;
43
import org.gvsig.tools.swing.api.SimpleImage;
44
import org.gvsig.tools.swing.api.ToolsSwingLocator;
45
import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager;
46
import org.gvsig.tools.swing.api.windowmanager.WindowManager;
47
import org.gvsig.tools.swing.icontheme.IconTheme;
48
import org.gvsig.tools.swing.icontheme.IconThemeManager;
49
import org.gvsig.tools.util.ToolsUtilLocator;
50
import org.slf4j.Logger;
51
import org.slf4j.LoggerFactory;
52

    
53
public class IconThemeDevelTool {
54
    
55
    public static final Logger LOGGER = LoggerFactory.getLogger(IconThemeDevelTool.class);
56

    
57
        public void showDefaultIconTheme() {
58
            try {
59
                IconThemeManager manager = ToolsSwingLocator.getIconThemeManager();
60
                String html = "<html>"
61
                        + "<style type=\"text/css\" media=\"print\">"
62
                        + "@page {\n"
63
                        + "  size: A4 landscape;\n"
64
                        + "}"
65
                        + "</style>"
66
                        + "\n<body>\n"+ this.getIconThemeInformationByGroup(manager.getDefault())+"</body>\n</html>\n";
67
                FoldersManager fm = ToolsLocator.getFoldersManager();
68
                File f = fm.createTemporaryFile("defaulticontheme-report.html", html);
69
                DesktopOpen desktopOpen = ToolsUtilLocator.getToolsUtilManager().createDesktopOpen();
70
                desktopOpen.browse(f.toURI());
71
                
72
 
73
//                ActionInfoManager actionManager = PluginsLocator.getActionInfoManager();
74
//                ActionInfo showPdf = actionManager.getAction("show-pdf");
75
//                if(showPdf == null) {
76
//                    InfoPanel.save2file("defaulticontheme-report", html);
77
//                    InfoPanel.showPanel("Default icon theme information", WindowManager.MODE.WINDOW, html);
78
//                } else {
79
//                    showPdf.execute(
80
//                            new Object[]{
81
//                                "--title=", "Default icon theme information",
82
//                                "--mode=", WindowManager.MODE.WINDOW,
83
//                                "--source=", html
84
//                            }
85
//                    );
86
//                }
87
            } catch (Exception ex) {
88
                LOGGER.warn("Can't show default icon theme.'", ex);
89
                I18nManager i18n = ToolsLocator.getI18nManager();
90
                ThreadSafeDialogsManager dialogs = ToolsSwingLocator.getThreadSafeDialogsManager();
91
                dialogs.messageDialog(
92
                        i18n.getTranslation("_Cant_show_default_icon_theme") + ")\n\n"+BaseException.getMessageStack(ex, 0),
93
                        i18n.getTranslation("_Show_default_icon_theme"),
94
                        JOptionPane.WARNING_MESSAGE
95
                );
96
            }
97

    
98
                
99
        }
100

    
101
        public void showCurrentIconTheme() {
102
            try {
103
                IconThemeManager manager = ToolsSwingLocator.getIconThemeManager();
104
                String html = "<html>"
105
                        + "<style type=\"text/css\" media=\"print\">"
106
                        + "@page {\n"
107
                        + "  size: A4 landscape;\n"
108
                        + "}"
109
                        + "</style>"
110
                        + "\n<body>\n"+ this.getIconThemeInformationByGroup(manager.getCurrent())+"</body>\n</html>\n";
111
 
112
                FoldersManager fm = ToolsLocator.getFoldersManager();
113
                File f = fm.createTemporaryFile("currenticontheme-report.html", html);
114
                DesktopOpen desktopOpen = ToolsUtilLocator.getToolsUtilManager().createDesktopOpen();
115
                desktopOpen.browse(f.toURI());
116

    
117
//                ActionInfoManager actionManager = PluginsLocator.getActionInfoManager();
118
//                ActionInfo showPdf = actionManager.getAction("show-pdf");
119
//                if(showPdf == null) {
120
//                    InfoPanel.save2file("currenticontheme-report", html);
121
//                    InfoPanel.showPanel("Current icon theme information", WindowManager.MODE.WINDOW, html);
122
//                } else {
123
//                    showPdf.execute(
124
//                            new Object[]{
125
//                                "--title=", "Current icon theme information",
126
//                                "--mode=", WindowManager.MODE.WINDOW,
127
//                                "--source=", html
128
//                            }
129
//                    );
130
//                }
131
            } catch (Exception ex) {
132
                LOGGER.warn("Can't show current icon theme.'", ex);
133
                I18nManager i18n = ToolsLocator.getI18nManager();
134
                ThreadSafeDialogsManager dialogs = ToolsSwingLocator.getThreadSafeDialogsManager();
135
                dialogs.messageDialog(
136
                        i18n.getTranslation("_Cant_show_current_icon_theme") + ")\n\n"+BaseException.getMessageStack(ex, 0),
137
                        i18n.getTranslation("_Show_current_icon_theme"),
138
                        JOptionPane.WARNING_MESSAGE
139
                );
140
            }
141

    
142
        }
143

    
144
        public void showDefaultIconThemeByPlugin() {
145
                String html = "<html>\n<body>\n"+ this.getIconThemeInformationByPlugin()+"</body>\n</html>\n";
146
                InfoPanel.save2file("icontheme-report", html);
147
                InfoPanel.showPanel("Icon theme information", WindowManager.MODE.WINDOW, html);
148
        }
149

    
150
        private String getIconThemeInformationByPlugin() {
151
                IconThemeManager manager = ToolsSwingLocator.getIconThemeManager();
152
                IconTheme theme = manager.getDefault();
153
                
154
                List<IconTheme.Icon>themeIcons = new ArrayList<IconTheme.Icon>();
155
                Iterator<IconTheme.Icon> themeIconsIt = theme.getThemeIcons();
156
                while (themeIconsIt.hasNext()) {
157
                        themeIcons.add(themeIconsIt.next());
158
                }
159
                Collections.sort(themeIcons, new Comparator<IconTheme.Icon>() {
160
                        public int compare(IconTheme.Icon o1, IconTheme.Icon o2) {
161
                                String s1 = String.format("%s:%s:%s", o1.getProviderName(), o1.getGroup(), o1.getName());
162
                                String s2 = String.format("%s:%s:%s", o2.getProviderName(), o2.getGroup(), o2.getName());
163
                                return s1.compareTo(s2);
164
                        }
165
                });
166
                themeIconsIt = themeIcons.iterator();
167
                return getIconThemeInformation(theme, themeIconsIt);
168
        }
169
        
170
        public String getIconThemeInformationOfPlugin(String pluginName) {
171
                if( pluginName == null ) {
172
                        return "";
173
                }
174
                IconThemeManager manager = ToolsSwingLocator.getIconThemeManager();
175
                IconTheme theme = manager.getDefault();
176
                
177
                List<IconTheme.Icon>themeIcons = new ArrayList<IconTheme.Icon>();
178
                Iterator<IconTheme.Icon> themeIconsIt = theme.getThemeIcons();
179
                while (themeIconsIt.hasNext()) {
180
                        IconTheme.Icon iconTheme = (IconTheme.Icon) themeIconsIt.next();
181
                        if( !pluginName.equalsIgnoreCase(iconTheme.getProviderName()) ) {
182
                                continue;
183
                        }
184
                        themeIcons.add(iconTheme);
185
                }
186
                Collections.sort(themeIcons, new Comparator<IconTheme.Icon>() {
187
                        public int compare(IconTheme.Icon o1, IconTheme.Icon o2) {
188
                                String s1 = String.format("%s:%s:%s", o1.getProviderName(), o1.getGroup(), o1.getName());
189
                                String s2 = String.format("%s:%s:%s", o2.getProviderName(), o2.getGroup(), o2.getName());
190
                                return s1.compareTo(s2);
191
                        }
192
                });
193
                themeIconsIt = themeIcons.iterator();
194
                return getIconThemeInformation(theme, themeIconsIt);
195
        }
196
        
197
        private String getIconThemeInformationByGroup(IconTheme theme) {
198
                
199
                List<IconTheme.Icon>themeIcons = new ArrayList<IconTheme.Icon>();
200
                Iterator<IconTheme.Icon> themeIconsIt = theme.getThemeIcons();
201
                while (themeIconsIt.hasNext()) {
202
                        themeIcons.add(themeIconsIt.next());
203
                }
204
                Collections.sort(themeIcons, new Comparator<IconTheme.Icon>() {
205
                        public int compare(IconTheme.Icon o1, IconTheme.Icon o2) {
206
                                String s1 = String.format("%s:%s:%s", o1.getGroup(), o1.getName(), o1.getProviderName());
207
                                String s2 = String.format("%s:%s:%s", o2.getGroup(), o2.getName(), o2.getProviderName());
208
                                return s1.compareTo(s2);
209
                        }
210
                });
211
                themeIconsIt = themeIcons.iterator();
212
                return getIconThemeInformation(theme,themeIconsIt);
213
        }
214

    
215
        private String getIconThemeInformation(IconTheme theme, Iterator<IconTheme.Icon> themeIconsIt) {
216
                Set<String> actionIcons = new HashSet<String>();
217
                Iterator<ActionInfo> actions = PluginsLocator.getActionInfoManager().getActions(); 
218
                while (actions.hasNext()) {
219
                        ActionInfo action = actions.next();
220
                        if( action.getIconName()!=null ) {
221
                                actionIcons.add(action.getIconName());
222
                        }
223
                }
224
                Set<String> tangoIconNames = getTangoIconNames();
225
                
226
                StringBuffer buffer = new StringBuffer();
227

    
228
                String warning_open = "<b>";
229
                String warning_close = "</b>";
230
                
231
                String error_open = "<b><font color=\"red\">";
232
                String error_close = "</font></b>";
233

    
234
                String tangoicon_open = "<b><font color=\"green\">";
235
                String tangoicon_close = "</font></b>";
236
                
237
                String previousPluginName = null;
238

    
239
                buffer.append("<div>\n");
240
                buffer.append("<h2>Icon theme information</h2>\n");
241
                buffer.append("<br>\n");
242
                buffer.append("Theme: ");
243
                buffer.append(theme.getName());
244
                buffer.append("<br>\n");
245
                buffer.append("Description: ");
246
                buffer.append(theme.getDescription());
247
                buffer.append("<br>\n");
248

    
249
                buffer.append("<table border=\"0\">\n");
250
                buffer.append("  <tr>\n");
251
                buffer.append("    <td>Preview</td>\n");
252
                buffer.append("    <td>Group</td>\n");
253
                buffer.append("    <td>Name</td>\n");
254
                buffer.append("    <td>Provider/Plugin</td>\n");
255
                buffer.append("    <td>Resource</td>\n");
256
                buffer.append("  </tr>\n");
257
                
258
                
259
                while (themeIconsIt.hasNext()) {
260
                        IconTheme.Icon themeIcon = themeIconsIt.next();
261
                        if( previousPluginName!=null && !themeIcon.getProviderName().equals(previousPluginName) ) {
262
                                buffer
263
                                        .append("  <tr>\n")
264
                                        .append("    <td colspan=\"4\"><hr></td>\n")
265
                                        .append("  </tr>\n");
266
                                previousPluginName = themeIcon.getProviderName();
267
                        }
268
                        
269
                        buffer.append("  <tr valign=\"top\">\n");
270
                        
271
                        // Preview                        
272
                        if( themeIcon.getLabel().length()>0 && themeIcon.getImageIcon()!=null ) {
273
                                try {
274
                                        ImageIcon img = themeIcon.getImageIcon();
275
                                        SimpleImage simpleImg = ToolsSwingLocator.getToolsSwingManager().createSimpleImage(img);
276
                                        if( img.getIconHeight() > 48 || img.getIconWidth() > 48 ) {
277
                                                buffer
278
                                                        .append("    <td nowrap>")
279
                                                        .append("<img width=\"48\" height=\"48\" src=\"data:image/")
280
                                                        .append(simpleImg.getFormatName())
281
                                                        .append(";base64,")
282
                                                        .append(simpleImg.toStringBase64())
283
                                                        .append("\"><sup>(1)</sup>");
284
//                                                buffer.append("</td>");
285
                                        } else {
286
                                                buffer
287
                                                        .append("    <td>")
288
                                                        .append("<img src=\"data:image/")
289
                                                        .append(simpleImg.getFormatName())
290
                                                        .append(";base64,")
291
                                                        .append(simpleImg.toStringBase64())
292
                                                        .append("\">");
293
//                                                buffer.append("</td>");
294
                                        }
295
                                        if(!theme.isMyIcon(themeIcon.getName())){
296
                                            buffer.append("<sup>(2)</sup>");
297
                                        }
298
                                        buffer.append("</td>");
299
                                        
300
                                } catch(Exception ex) {
301
                                        buffer
302
                                                .append("    <td>")
303
                                                .append("<img src=\"")
304
                                                .append(themeIcon.getLabel())
305
                                                .append("\"></td>");
306
                                }
307
                        } else {
308
                                buffer.append("    <td></td>");
309
                        }
310
                
311
                        // Group
312
                        if( themeIcon.getGroup()==null ) {
313
                                buffer.append("    <td title=\"missing recomended group\">")
314
                                        .append(warning_open)
315
                                        .append(themeIcon.getGroup())
316
                                        .append(warning_close)
317
                                        .append("</td>\n");
318
                        } else {
319
                                buffer.append("    <td>")
320
                                        .append(themeIcon.getGroup())
321
                                        .append("</td>\n");
322
                        }
323

    
324
                        // Name
325
                        if( "action".equals(themeIcon.getGroup()) && !actionIcons.contains(themeIcon.getName())) {
326
                                buffer.append("    <td title=\"Don't exists an action associated to this icon\">")
327
                                        .append(error_open)
328
                                        .append(themeIcon.getName())
329
                                        .append(error_close)
330
                                        .append("</td>\n");
331
                        } else if( !themeIcon.getName().contains("-") ) {
332
                                buffer.append("    <td title=\"Name don't have recomended format\">")
333
                                        .append(warning_open)
334
                                        .append(themeIcon.getName())
335
                                        .append(warning_close)
336
                                        .append("</td>\n");
337
                        } else if( tangoIconNames.contains(themeIcon.getName()) ){
338
                                buffer.append("    <td>")
339
                                        .append(tangoicon_open)
340
                                        .append(themeIcon.getName())
341
                                        .append(tangoicon_close)
342
                                        .append("</td>\n");
343
                        } else {
344
                                buffer.append("    <td>")
345
                                        .append(themeIcon.getName())
346
                                        .append("</td>\n");
347
                        }
348

    
349
                        // Plugin
350
                        if( themeIcon.getProviderName()== null ) {
351
                                buffer.append("    <td title=\"missing recomended associated plugin\">")
352
                                        .append(warning_open)
353
                                        .append(themeIcon.getProviderName())
354
                                        .append(warning_close)
355
                                        .append("</td>\n");
356
                                
357
                        }  else {
358
                                buffer.append("    <td>")
359
                                        .append(themeIcon.getProviderName())
360
                                        .append("</td>\n");
361
                        }                        
362
                        
363
                        // Resource
364
                        if( themeIcon.getLabel().length()<1 ) {
365
                                buffer.append("    <td title=\"Resource icon not specified\">")
366
                                        .append(error_open)
367
                                        .append("(missing)")
368
                                        .append(error_close)
369
                                        .append("</td>\n");
370
                        } else if( themeIcon.getImageIcon()==null ) {
371
                                buffer.append("    <td title=\"Can't locate icon\">")
372
                                        .append(error_open)
373
                                        .append(themeIcon.getLabel())
374
                                        .append(error_close)
375
                                        .append("</td>\n");
376
                        } else {
377
                                buffer.append("    <td>")
378
                                        .append(themeIcon.getLabel())
379
                                        .append("</td>\n");
380

    
381
                        }
382
                        buffer.append("  </tr>\n");
383
                }
384
                buffer.append("</table>\n");
385
                buffer.append("<p><sup>(1)</sup> Resized Icon<br><sup>(2)</sup> Icon in default theme</p>");
386
                buffer.append("</div>\n");
387

    
388
                return buffer.toString();
389
        }
390

    
391
        private Set<String> getTangoIconNames() {
392
                String[] iconNames = new String[] {
393
                                "address-book-new",
394
                                "application-exit",
395
                                "appointment-new",
396
                                "call-start",
397
                                "call-stop",
398
                                "contact-new",
399
                                "document-new",
400
                                "document-open",
401
                                "document-open-recent",
402
                                "document-page-setup",
403
                                "document-print",
404
                                "document-print-preview",
405
                                "document-properties",
406
                                "document-revert",
407
                                "document-save",
408
                                "document-save-as",
409
                                "document-send",
410
                                "edit-clear",
411
                                "edit-copy",
412
                                "edit-cut",
413
                                "edit-delete",
414
                                "edit-find",
415
                                "edit-find-replace",
416
                                "edit-paste",
417
                                "edit-redo",
418
                                "edit-select-all",
419
                                "edit-undo",
420
                                "folder-new",
421
                                "format-indent-less",
422
                                "format-indent-more",
423
                                "format-justify-center",
424
                                "format-justify-fill",
425
                                "format-justify-left",
426
                                "format-justify-right",
427
                                "format-text-direction-ltr",
428
                                "format-text-direction-rtl",
429
                                "format-text-bold",
430
                                "format-text-italic",
431
                                "format-text-underline",
432
                                "format-text-strikethrough",
433
                                "go-bottom",
434
                                "go-down",
435
                                "go-first",
436
                                "go-home",
437
                                "go-jump",
438
                                "go-last",
439
                                "go-next",
440
                                "go-previous",
441
                                "go-top",
442
                                "go-up",
443
                                "help-about",
444
                                "help-contents",
445
                                "help-faq",
446
                                "insert-image",
447
                                "insert-link",
448
                                "insert-object",
449
                                "insert-text",
450
                                "list-add",
451
                                "list-remove",
452
                                "mail-forward",
453
                                "mail-mark-important",
454
                                "mail-mark-junk",
455
                                "mail-mark-notjunk",
456
                                "mail-mark-read",
457
                                "mail-mark-unread",
458
                                "mail-message-new",
459
                                "mail-reply-all",
460
                                "mail-reply-sender",
461
                                "mail-send",
462
                                "mail-send-receive",
463
                                "media-eject",
464
                                "media-playback-pause",
465
                                "media-playback-start",
466
                                "media-playback-stop",
467
                                "media-record",
468
                                "media-seek-backward",
469
                                "media-seek-forward",
470
                                "media-skip-backward",
471
                                "media-skip-forward",
472
                                "object-flip-horizontal",
473
                                "object-flip-vertical",
474
                                "object-rotate-left",
475
                                "object-rotate-right",
476
                                "process-stop",
477
                                "system-lock-screen",
478
                                "system-log-out",
479
                                "system-run",
480
                                "system-search",
481
                                "system-reboot",
482
                                "system-shutdown",
483
                                "tools-check-spelling",
484
                                "view-fullscreen",
485
                                "view-refresh",
486
                                "view-restore",
487
                                "view-sort-ascending",
488
                                "view-sort-descending",
489
                                "window-close",
490
                                "window-new",
491
                                "zoom-fit-best",
492
                                "zoom-in",
493
                                "zoom-original",
494
                                "zoom-out",
495
                                "process-working",
496
                                "accessories-calculator",
497
                                "accessories-character-map",
498
                                "accessories-dictionary",
499
                                "accessories-text-editor",
500
                                "help-browser",
501
                                "multimedia-volume-control",
502
                                "preferences-desktop-accessibility",
503
                                "preferences-desktop-font",
504
                                "preferences-desktop-keyboard",
505
                                "preferences-desktop-locale",
506
                                "preferences-desktop-multimedia",
507
                                "preferences-desktop-screensaver",
508
                                "preferences-desktop-theme",
509
                                "preferences-desktop-wallpaper",
510
                                "system-file-manager",
511
                                "system-software-install",
512
                                "system-software-update",
513
                                "utilities-system-monitor",
514
                                "utilities-terminal",
515
                                "applications-accessories",
516
                                "applications-development",
517
                                "applications-engineering",
518
                                "applications-games",
519
                                "applications-graphics",
520
                                "applications-internet",
521
                                "applications-multimedia",
522
                                "applications-office",
523
                                "applications-other",
524
                                "applications-science",
525
                                "applications-system",
526
                                "applications-utilities",
527
                                "preferences-desktop",
528
                                "preferences-desktop-peripherals",
529
                                "preferences-desktop-personal",
530
                                "preferences-other",
531
                                "preferences-system",
532
                                "preferences-system-network",
533
                                "system-help",
534
                                "audio-card",
535
                                "audio-input-microphone",
536
                                "battery",
537
                                "camera-photo",
538
                                "camera-video",
539
                                "camera-web",
540
                                "computer",
541
                                "drive-harddisk",
542
                                "drive-optical",
543
                                "drive-removable-media",
544
                                "input-gaming",
545
                                "input-keyboard",
546
                                "input-mouse",
547
                                "input-tablet",
548
                                "media-flash",
549
                                "media-floppy",
550
                                "media-optical",
551
                                "media-tape",
552
                                "modem",
553
                                "multimedia-player",
554
                                "network-wired",
555
                                "network-wireless",
556
                                "pda",
557
                                "phone",
558
                                "printer",
559
                                "scanner",
560
                                "video-display",
561
                                "emblem-default",
562
                                "emblem-documents",
563
                                "emblem-downloads",
564
                                "emblem-favorite",
565
                                "emblem-important",
566
                                "emblem-mail",
567
                                "emblem-photos",
568
                                "emblem-readonly",
569
                                "emblem-shared",
570
                                "emblem-symbolic-link",
571
                                "emblem-synchronized",
572
                                "emblem-system",
573
                                "emblem-unreadable",
574
                                "face-angel",
575
                                "face-angry",
576
                                "face-cool",
577
                                "face-crying",
578
                                "face-devilish",
579
                                "face-embarrassed",
580
                                "face-kiss",
581
                                "face-laugh",
582
                                "face-monkey",
583
                                "face-plain",
584
                                "face-raspberry",
585
                                "face-sad",
586
                                "face-sick",
587
                                "face-smile",
588
                                "face-smile-big",
589
                                "face-smirk",
590
                                "face-surprise",
591
                                "face-tired",
592
                                "face-uncertain",
593
                                "face-wink",
594
                                "face-worried",
595
                                "flag-aa",
596
                                "application-x-executable",
597
                                "audio-x-generic",
598
                                "font-x-generic",
599
                                "image-x-generic",
600
                                "package-x-generic",
601
                                "text-html",
602
                                "text-x-generic",
603
                                "text-x-generic-template",
604
                                "text-x-script",
605
                                "video-x-generic",
606
                                "x-office-address-book",
607
                                "x-office-calendar",
608
                                "x-office-document",
609
                                "x-office-presentation",
610
                                "x-office-spreadsheet",
611
                                "folder",
612
                                "folder-remote",
613
                                "network-server",
614
                                "network-workgroup",
615
                                "start-here",
616
                                "user-bookmarks",
617
                                "user-desktop",
618
                                "user-home",
619
                                "user-trash",
620
                                "appointment-missed",
621
                                "appointment-soon",
622
                                "audio-volume-high",
623
                                "audio-volume-low",
624
                                "audio-volume-medium",
625
                                "audio-volume-muted",
626
                                "battery-caution",
627
                                "battery-low",
628
                                "dialog-error",
629
                                "dialog-information",
630
                                "dialog-password",
631
                                "dialog-question",
632
                                "dialog-warning",
633
                                "folder-drag-accept",
634
                                "folder-open",
635
                                "folder-visiting",
636
                                "image-loading",
637
                                "image-missing",
638
                                "mail-attachment",
639
                                "mail-unread",
640
                                "mail-read",
641
                                "mail-replied",
642
                                "mail-signed",
643
                                "mail-signed-verified",
644
                                "media-playlist-repeat",
645
                                "media-playlist-shuffle",
646
                                "network-error",
647
                                "network-idle",
648
                                "network-offline",
649
                                "network-receive",
650
                                "network-transmit",
651
                                "network-transmit-receive",
652
                                "printer-error",
653
                                "printer-printing",
654
                                "security-high",
655
                                "security-medium",
656
                                "security-low",
657
                                "software-update-available",
658
                                "software-update-urgent",
659
                                "sync-error",
660
                                "sync-synchronizing",
661
                                "task-due",
662
                                "task-past-due",
663
                                "user-available",
664
                                "user-away",
665
                                "user-idle",
666
                                "user-offline",
667
                                "user-trash-full",
668
                                "weather-clear",
669
                                "weather-clear-night",
670
                                "weather-few-clouds",
671
                                "weather-few-clouds-night",
672
                                "weather-fog",
673
                                "weather-overcast",
674
                                "weather-severe-alert",
675
                                "weather-showers",
676
                                "weather-showers-scattered",
677
                                "weather-snow",
678
                                "weather-storm"
679
                };
680
                Set<String> icons = new HashSet<String>();
681
                for (int i = 0; i < iconNames.length; i++) {
682
                        icons.add(iconNames[i]);
683
                }
684
                return icons;
685
        }
686

    
687
}