KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > util > ImageOverlayIcon


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

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