1 /******************************************************************************* |
|
2 * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Symbian Foundation - initial contribution. |
|
11 * Contributors: |
|
12 * Description: |
|
13 * Overview: |
|
14 * Details: |
|
15 * Platforms/Drives/Compatibility: |
|
16 * Assumptions/Requirement/Pre-requisites: |
|
17 * Failures and causes: |
|
18 *******************************************************************************/ |
|
19 package org.symbian.tools.wrttools.debug.internal; |
|
20 |
|
21 import org.eclipse.jface.resource.ImageDescriptor; |
|
22 import org.eclipse.jface.resource.ImageRegistry; |
|
23 import org.eclipse.swt.graphics.Image; |
|
24 |
|
25 public class Images { |
|
26 private static final String WRT16 = "main16.gif"; |
|
27 |
|
28 public static void initImageRegistry(ImageRegistry registry) { |
|
29 setImage(registry, WRT16); |
|
30 } |
|
31 |
|
32 private static void setImage(ImageRegistry registry, String image) { |
|
33 ImageDescriptor img = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/" + image); |
|
34 registry.put(image, img); |
|
35 } |
|
36 |
|
37 public static ImageDescriptor getWrtIcon() { |
|
38 return getImageDescriptor(WRT16); |
|
39 } |
|
40 |
|
41 private static ImageDescriptor getImageDescriptor(String image) { |
|
42 return Activator.getDefault().getImageRegistry().getDescriptor(image); |
|
43 } |
|
44 |
|
45 public static Image getWrtIconImage() { |
|
46 return getImage(WRT16); |
|
47 } |
|
48 |
|
49 private static Image getImage(String image) { |
|
50 return Activator.getDefault().getImageRegistry().get(image); |
|
51 } |
|
52 } |
|