]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.message.ui/src/org/simantics/message/ui/SharedImages.java
Workaround to fix performance problems when opening log view
[simantics/platform.git] / bundles / org.simantics.message.ui / src / org / simantics / message / ui / SharedImages.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.message.ui;
13
14 import org.eclipse.jface.resource.ImageDescriptor;
15 import org.eclipse.swt.graphics.Image;
16
17 public final class SharedImages {
18
19         private SharedImages() { // do nothing
20         }
21
22         public final static String ICONS_PATH = "icons/"; //$NON-NLS-1$
23
24         private static final String PATH_OBJ = ICONS_PATH + "obj16/"; //$NON-NLS-1$
25         private static final String PATH_LCL = ICONS_PATH + "elcl16/"; //$NON-NLS-1$
26         private static final String PATH_LCL_DISABLED = ICONS_PATH + "dlcl16/"; //$NON-NLS-1$
27         private static final String PATH_EVENTS = ICONS_PATH + "eview16/"; //$NON-NLS-1$
28
29         /* Event Details */
30         public static final String DESC_PREV_EVENT = PATH_EVENTS + "event_prev.gif"; //$NON-NLS-1$
31         public static final String DESC_NEXT_EVENT = PATH_EVENTS + "event_next.gif"; //$NON-NLS-1$      
32
33         public static final String DESC_CLEAR = PATH_LCL + "clear.gif"; //$NON-NLS-1$
34         public static final String DESC_CLEAR_DISABLED = PATH_LCL_DISABLED + "clear.gif"; //$NON-NLS-1$
35         public static final String DESC_REMOVE_LOG = PATH_LCL + "remove.gif"; //$NON-NLS-1$
36         public static final String DESC_REMOVE_LOG_DISABLED = PATH_LCL_DISABLED + "remove.gif"; //$NON-NLS-1$
37         public static final String DESC_EXPORT = PATH_LCL + "export_log.gif"; //$NON-NLS-1$
38         public static final String DESC_EXPORT_DISABLED = PATH_LCL_DISABLED + "export_log.gif"; //$NON-NLS-1$
39         public static final String DESC_FILTER = PATH_LCL + "filter_ps.gif"; //$NON-NLS-1$
40         public static final String DESC_FILTER_DISABLED = PATH_LCL_DISABLED + "filter_ps.gif"; //$NON-NLS-1$
41         public static final String DESC_IMPORT = PATH_LCL + "import_log.gif"; //$NON-NLS-1$
42         public static final String DESC_IMPORT_DISABLED = PATH_LCL_DISABLED + "import_log.gif"; //$NON-NLS-1$
43         public static final String DESC_OPEN_LOG = PATH_LCL + "open_log.gif"; //$NON-NLS-1$
44         public static final String DESC_OPEN_LOG_DISABLED = PATH_LCL_DISABLED + "open_log.gif"; //$NON-NLS-1$
45         public static final String DESC_PROPERTIES = PATH_LCL + "properties.gif"; //$NON-NLS-1$
46         public static final String DESC_PROPERTIES_DISABLED = PATH_LCL_DISABLED + "properties.gif"; //$NON-NLS-1$
47         public static final String DESC_READ_LOG = PATH_LCL + "restore_log.gif"; //$NON-NLS-1$
48         public static final String DESC_READ_LOG_DISABLED = PATH_LCL_DISABLED + "restore_log.gif"; //$NON-NLS-1$
49
50     public static final String DESC_DEBUG_ST_OBJ = PATH_OBJ + "bug.png"; //$NON-NLS-1$
51     public static final String DESC_ERROR_ST_OBJ = PATH_OBJ + "error_st_obj.gif"; //$NON-NLS-1$
52         public static final String DESC_ERROR_STACK_OBJ = PATH_OBJ + "error_stack.gif"; //$NON-NLS-1$
53         public static final String DESC_INFO_ST_OBJ = PATH_OBJ + "info_st_obj.gif"; //$NON-NLS-1$
54         public static final String DESC_OK_ST_OBJ = PATH_OBJ + "ok_st_obj.gif"; //$NON-NLS-1$
55         public static final String DESC_WARNING_ST_OBJ = PATH_OBJ + "warning_st_obj.gif"; //$NON-NLS-1$
56     public static final String DESC_HIERARCHICAL_LAYOUT_OBJ = PATH_OBJ + "hierarchical.gif"; //$NON-NLS-1$
57
58     public static final String DESC_SHOW_TEXT_FILTER = ICONS_PATH + "textfield.png"; //$NON-NLS-1$
59     
60         public static ImageDescriptor getImageDescriptor(String key) {
61                 return Activator.getDefault().getImageRegistry().getDescriptor(key);
62         }
63
64         public static Image getImage(String key) {
65                 return Activator.getDefault().getImageRegistry().get(key);
66         }
67
68 }