View | Details | Raw Unified | Return to bug 121326
Collapse All | Expand All

(-)src/org/eclipse/mylar/tasklist/ui/TaskListImages.java (-2 / +12 lines)
Lines 34-40 Link Here
34
 */ 
34
 */ 
35
public class TaskListImages {
35
public class TaskListImages {
36
36
37
    private static ImageRegistry imageRegistry = new ImageRegistry();
37
    private static ImageRegistry imageRegistry;
38
	
38
	
39
    public static final Color BACKGROUND_WHITE = new Color(Display.getDefault(), 255, 255, 255);
39
    public static final Color BACKGROUND_WHITE = new Color(Display.getDefault(), 255, 255, 255);
40
    public static final Color BACKGROUND_ARCHIVE = new Color(Display.getDefault(), 190, 210, 238);
40
    public static final Color BACKGROUND_ARCHIVE = new Color(Display.getDefault(), 190, 210, 238);
Lines 107-118 Link Here
107
		buffer.append('/');
107
		buffer.append('/');
108
		buffer.append(name);
108
		buffer.append(name);
109
		return new URL(baseURL, buffer.toString());
109
		return new URL(baseURL, buffer.toString());
110
	}	
110
	}
111
	
112
	private static ImageRegistry getImageRegistry() {
113
		if (imageRegistry == null) {
114
			imageRegistry = new ImageRegistry();
115
		}
116
		
117
		return imageRegistry;
118
	}
111
	
119
	
112
	/**
120
	/**
113
	 * Lazily initializes image map.
121
	 * Lazily initializes image map.
114
	 */
122
	 */
115
	public static Image getImage(ImageDescriptor imageDescriptor) {
123
	public static Image getImage(ImageDescriptor imageDescriptor) {
124
		ImageRegistry imageRegistry = getImageRegistry();
125
		
116
	    Image image = imageRegistry.get(""+imageDescriptor.hashCode());
126
	    Image image = imageRegistry.get(""+imageDescriptor.hashCode());
117
	    if (image == null) {
127
	    if (image == null) {
118
	        image = imageDescriptor.createImage();
128
	        image = imageDescriptor.createImage();

Return to bug 121326