1 11 package org.eclipse.update.internal.ui; 12 13 import java.net.URL ; 14 15 import org.eclipse.core.runtime.FileLocator; 16 import org.eclipse.core.runtime.Path; 17 import org.eclipse.jface.resource.ImageDescriptor; 18 19 22 public class UpdateUIImages { 23 24 public final static String ICONS_PATH = "icons/"; 26 29 30 private static final String PATH_OBJ= ICONS_PATH+"obj16/"; private static final String PATH_VIEW = ICONS_PATH+"eview16/"; private static final String PATH_LCL= ICONS_PATH+"elcl16/"; private static final String PATH_LCL_DISABLED= ICONS_PATH+"dlcl16/"; private static final String PATH_OVR = ICONS_PATH + "ovr16/"; private static final String PATH_WIZBAN = ICONS_PATH + "wizban/"; public static final String PATH_FORMS = ICONS_PATH + "forms/"; 38 39 42 43 46 public static final ImageDescriptor DESC_APP_OBJ = create(PATH_OBJ, "app_obj.gif"); public static final ImageDescriptor DESC_BFOLDER_OBJ = create(PATH_OBJ, "bfolder_obj.gif"); public static final ImageDescriptor DESC_CATEGORY_OBJ = create(PATH_OBJ, "category_obj.gif"); public static final ImageDescriptor DESC_CONFIG_OBJ = create(PATH_OBJ, "config_obj.gif"); public static final ImageDescriptor DESC_FEATURE_OBJ = create(PATH_OBJ, "feature_obj.gif"); public static final ImageDescriptor DESC_EFIX_OBJ = create(PATH_OBJ, "efix2_obj.gif"); public static final ImageDescriptor DESC_HISTORY_OBJ = create(PATH_OBJ, "history_obj.gif"); public static final ImageDescriptor DESC_LSITE_OBJ = create(PATH_OBJ, "lsite_obj.gif"); public static final ImageDescriptor DESC_PSITE_OBJ = create(PATH_OBJ, "psite_obj.gif"); public static final ImageDescriptor DESC_ESITE_OBJ = create(PATH_OBJ, "esite_obj.gif"); public static final ImageDescriptor DESC_SITE_OBJ = create(PATH_OBJ, "site_obj.gif"); public static final ImageDescriptor DESC_WEB_SITE_OBJ = create(PATH_OBJ, "web_bkmrk_obj.gif"); public static final ImageDescriptor DESC_UNCONF_FEATURE_OBJ = create(PATH_OBJ, "unconf_feature_obj.gif"); public static final ImageDescriptor DESC_UPDATES_OBJ = create(PATH_OBJ, "updates_obj.gif"); public static final ImageDescriptor DESC_NOTINST_FEATURE_OBJ = create(PATH_OBJ, "notinstalled_feature_obj.gif"); public static final ImageDescriptor DESC_ERR_ST_OBJ = create(PATH_OBJ, "error_st_obj.gif"); public static final ImageDescriptor DESC_OK_ST_OBJ = create(PATH_OBJ, "ok_st_obj.gif"); 64 65 68 public static final ImageDescriptor DESC_LINKED_CO = create(PATH_OVR, "linked_co.gif"); public static final ImageDescriptor DESC_UPDATED_CO = create(PATH_OVR, "updated_co.gif"); public static final ImageDescriptor DESC_INSTALLABLE_CO = create(PATH_OVR, "installable_co.gif"); public static final ImageDescriptor DESC_CURRENT_CO = create(PATH_OVR, "current_co.gif"); public static final ImageDescriptor DESC_ERROR_CO = create(PATH_OVR, "error_co.gif"); public static final ImageDescriptor DESC_WARNING_CO = create(PATH_OVR, "warning_co.gif"); public static final ImageDescriptor DESC_MOD_CO = create(PATH_OVR, "mod_co.gif"); public static final ImageDescriptor DESC_ADD_CO = create(PATH_OVR, "add_stat.gif"); public static final ImageDescriptor DESC_DEL_CO = create(PATH_OVR, "del_stat.gif"); public static final ImageDescriptor DESC_UNCONF_CO = create(PATH_OVR, "unconfigured_co.gif"); 79 82 83 public static final ImageDescriptor DESC_CONFIGS_VIEW = create(PATH_VIEW, "configs.gif"); 85 88 89 public static final ImageDescriptor DESC_COLLAPSE_ALL = create(PATH_LCL, "collapseall.gif"); public static final ImageDescriptor DESC_SHOW_HIERARCHY = create(PATH_LCL, "hierarchicalLayout.gif"); public static final ImageDescriptor DESC_SHOW_HIERARCHY_D = create(PATH_LCL_DISABLED, "hierarchicalLayout.gif"); 96 99 public static final ImageDescriptor DESC_UPDATE_WIZ = create(PATH_WIZBAN, "update_wiz.gif"); public static final ImageDescriptor DESC_CONFIG_WIZ = create(PATH_WIZBAN, "config_wiz.gif"); public static final ImageDescriptor DESC_UNINSTALL_WIZ = create(PATH_WIZBAN, "uninstall_wiz.gif"); public static final ImageDescriptor DESC_INSTALL_BANNER = create(PATH_WIZBAN, "def_wizban.jpg"); public static final ImageDescriptor DESC_PROVIDER = create(PATH_FORMS, "def_provider.jpg"); public static final ImageDescriptor DESC_ITEM = create(PATH_FORMS, "topic.gif"); 107 private static ImageDescriptor create(String prefix, String name) { 108 return ImageDescriptor.createFromURL(makeImageURL(prefix, name)); 109 } 110 111 112 private static URL makeImageURL(String prefix, String name) { 113 String path = "$nl$/" + prefix + name; return FileLocator.find(UpdateUI.getDefault().getBundle(), new Path(path), null); 115 } 116 117 } 118 | Popular Tags |