KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > help > ui > internal > util > OverlayIcon


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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.help.ui.internal.util;
12
13 import org.eclipse.jface.resource.ImageDescriptor;
14 import org.eclipse.swt.graphics.*;
15
16 /**
17  * An OverlayIcon consists of a main icon and several adornments.
18  */

19 public class OverlayIcon extends AbstractOverlayIcon {
20     private ImageDescriptor fBase;
21
22     public OverlayIcon(ImageDescriptor base, ImageDescriptor[][] overlays) {
23         this(base, overlays, null);
24     }
25
26     public OverlayIcon(ImageDescriptor base, ImageDescriptor[][] overlays,
27             Point size) {
28         super(overlays, size);
29         fBase = base;
30         if (fBase == null)
31             fBase = ImageDescriptor.getMissingImageDescriptor();
32     }
33
34     protected ImageData getBaseImageData() {
35         return fBase.getImageData();
36     }
37 }
38
Popular Tags