KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > internal > ui > UpdateUIImages


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.update.internal.ui;
12
13 import java.net.URL JavaDoc;
14
15 import org.eclipse.core.runtime.FileLocator;
16 import org.eclipse.core.runtime.Path;
17 import org.eclipse.jface.resource.ImageDescriptor;
18
19 /**
20  * Bundle of all images used by the PDE plugin.
21  */

22 public class UpdateUIImages {
23
24     public final static String JavaDoc ICONS_PATH = "icons/"; //$NON-NLS-1$
25

26     /**
27      * Set of predefined Image Descriptors.
28      */

29     
30     private static final String JavaDoc PATH_OBJ= ICONS_PATH+"obj16/"; //$NON-NLS-1$
31
private static final String JavaDoc PATH_VIEW = ICONS_PATH+"eview16/"; //$NON-NLS-1$
32
private static final String JavaDoc PATH_LCL= ICONS_PATH+"elcl16/"; //$NON-NLS-1$
33
private static final String JavaDoc PATH_LCL_DISABLED= ICONS_PATH+"dlcl16/"; //$NON-NLS-1$
34
private static final String JavaDoc PATH_OVR = ICONS_PATH + "ovr16/"; //$NON-NLS-1$
35
private static final String JavaDoc PATH_WIZBAN = ICONS_PATH + "wizban/"; //$NON-NLS-1$
36
public static final String JavaDoc PATH_FORMS = ICONS_PATH + "forms/"; //$NON-NLS-1$
37

38
39     /**
40      * Frequently used images
41      */

42
43     /**
44      * OBJ16
45      */

46     public static final ImageDescriptor DESC_APP_OBJ = create(PATH_OBJ, "app_obj.gif"); //$NON-NLS-1$
47
public static final ImageDescriptor DESC_BFOLDER_OBJ = create(PATH_OBJ, "bfolder_obj.gif"); //$NON-NLS-1$
48
public static final ImageDescriptor DESC_CATEGORY_OBJ = create(PATH_OBJ, "category_obj.gif"); //$NON-NLS-1$
49
public static final ImageDescriptor DESC_CONFIG_OBJ = create(PATH_OBJ, "config_obj.gif"); //$NON-NLS-1$
50
public static final ImageDescriptor DESC_FEATURE_OBJ = create(PATH_OBJ, "feature_obj.gif"); //$NON-NLS-1$
51
public static final ImageDescriptor DESC_EFIX_OBJ = create(PATH_OBJ, "efix2_obj.gif"); //$NON-NLS-1$
52
public static final ImageDescriptor DESC_HISTORY_OBJ = create(PATH_OBJ, "history_obj.gif"); //$NON-NLS-1$
53
public static final ImageDescriptor DESC_LSITE_OBJ = create(PATH_OBJ, "lsite_obj.gif"); //$NON-NLS-1$
54
public static final ImageDescriptor DESC_PSITE_OBJ = create(PATH_OBJ, "psite_obj.gif"); //$NON-NLS-1$
55
public static final ImageDescriptor DESC_ESITE_OBJ = create(PATH_OBJ, "esite_obj.gif"); //$NON-NLS-1$
56
public static final ImageDescriptor DESC_SITE_OBJ = create(PATH_OBJ, "site_obj.gif"); //$NON-NLS-1$
57
public static final ImageDescriptor DESC_WEB_SITE_OBJ = create(PATH_OBJ, "web_bkmrk_obj.gif"); //$NON-NLS-1$
58
public static final ImageDescriptor DESC_UNCONF_FEATURE_OBJ = create(PATH_OBJ, "unconf_feature_obj.gif"); //$NON-NLS-1$
59
public static final ImageDescriptor DESC_UPDATES_OBJ = create(PATH_OBJ, "updates_obj.gif"); //$NON-NLS-1$
60
public static final ImageDescriptor DESC_NOTINST_FEATURE_OBJ = create(PATH_OBJ, "notinstalled_feature_obj.gif"); //$NON-NLS-1$
61
public static final ImageDescriptor DESC_ERR_ST_OBJ = create(PATH_OBJ, "error_st_obj.gif"); //$NON-NLS-1$
62
public static final ImageDescriptor DESC_OK_ST_OBJ = create(PATH_OBJ, "ok_st_obj.gif"); //$NON-NLS-1$
63

64     
65     /**
66      * OVR16
67      */

68     public static final ImageDescriptor DESC_LINKED_CO = create(PATH_OVR, "linked_co.gif"); //$NON-NLS-1$
69
public static final ImageDescriptor DESC_UPDATED_CO = create(PATH_OVR, "updated_co.gif"); //$NON-NLS-1$
70
public static final ImageDescriptor DESC_INSTALLABLE_CO = create(PATH_OVR, "installable_co.gif"); //$NON-NLS-1$
71
public static final ImageDescriptor DESC_CURRENT_CO = create(PATH_OVR, "current_co.gif"); //$NON-NLS-1$
72
public static final ImageDescriptor DESC_ERROR_CO = create(PATH_OVR, "error_co.gif"); //$NON-NLS-1$
73
public static final ImageDescriptor DESC_WARNING_CO = create(PATH_OVR, "warning_co.gif"); //$NON-NLS-1$
74
public static final ImageDescriptor DESC_MOD_CO = create(PATH_OVR, "mod_co.gif"); //$NON-NLS-1$
75
public static final ImageDescriptor DESC_ADD_CO = create(PATH_OVR, "add_stat.gif"); //$NON-NLS-1$
76
public static final ImageDescriptor DESC_DEL_CO = create(PATH_OVR, "del_stat.gif"); //$NON-NLS-1$
77
public static final ImageDescriptor DESC_UNCONF_CO = create(PATH_OVR, "unconfigured_co.gif"); //$NON-NLS-1$
78

79     /**
80      * VIEW16
81      */

82
83     public static final ImageDescriptor DESC_CONFIGS_VIEW = create(PATH_VIEW, "configs.gif"); //$NON-NLS-1$
84

85     /**
86      * LCL
87      */

88
89 // public static final ImageDescriptor DESC_SHOW_UNCONF = create(PATH_LCL, "show_unconf.gif"); //$NON-NLS-1$
90
// public static final ImageDescriptor DESC_SHOW_UNCONF_H = create(PATH_LCL_HOVER, "show_unconf.gif"); //$NON-NLS-1$
91
// public static final ImageDescriptor DESC_SHOW_UNCONF_D = create(PATH_LCL_DISABLED, "show_unconf.gif"); //$NON-NLS-1$
92
public static final ImageDescriptor DESC_COLLAPSE_ALL = create(PATH_LCL, "collapseall.gif"); //$NON-NLS-1$
93
public static final ImageDescriptor DESC_SHOW_HIERARCHY = create(PATH_LCL, "hierarchicalLayout.gif"); //$NON-NLS-1$
94
public static final ImageDescriptor DESC_SHOW_HIERARCHY_D = create(PATH_LCL_DISABLED, "hierarchicalLayout.gif"); //$NON-NLS-1$
95

96     /**
97      * WIZ
98      */

99 // public static final ImageDescriptor DESC_INSTALL_WIZ = create(PATH_WIZBAN, "install_wiz.gif"); //$NON-NLS-1$
100
public static final ImageDescriptor DESC_UPDATE_WIZ = create(PATH_WIZBAN, "update_wiz.gif"); //$NON-NLS-1$
101
public static final ImageDescriptor DESC_CONFIG_WIZ = create(PATH_WIZBAN, "config_wiz.gif"); //$NON-NLS-1$
102
public static final ImageDescriptor DESC_UNINSTALL_WIZ = create(PATH_WIZBAN, "uninstall_wiz.gif"); //$NON-NLS-1$
103
public static final ImageDescriptor DESC_INSTALL_BANNER = create(PATH_WIZBAN, "def_wizban.jpg"); //$NON-NLS-1$
104
public static final ImageDescriptor DESC_PROVIDER = create(PATH_FORMS, "def_provider.jpg"); //$NON-NLS-1$
105
public static final ImageDescriptor DESC_ITEM = create(PATH_FORMS, "topic.gif"); //$NON-NLS-1$
106

107     private static ImageDescriptor create(String JavaDoc prefix, String JavaDoc name) {
108         return ImageDescriptor.createFromURL(makeImageURL(prefix, name));
109     }
110
111
112     private static URL JavaDoc makeImageURL(String JavaDoc prefix, String JavaDoc name) {
113         String JavaDoc path = "$nl$/" + prefix + name; //$NON-NLS-1$
114
return FileLocator.find(UpdateUI.getDefault().getBundle(), new Path(path), null);
115     }
116
117 }
118
Popular Tags