01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.util;
11:
12: import org.eclipse.jface.resource.ImageDescriptor;
13: import org.eclipse.swt.graphics.ImageData;
14: import org.eclipse.swt.graphics.Point;
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,
23: ImageDescriptor[][] overlays) {
24: this (base, overlays, null);
25: }
26:
27: public OverlayIcon(ImageDescriptor base,
28: ImageDescriptor[][] overlays, Point size) {
29: super (overlays, size);
30: fBase = base;
31: if (fBase == null)
32: fBase = ImageDescriptor.getMissingImageDescriptor();
33: }
34:
35: protected ImageData getBaseImageData() {
36: return fBase.getImageData();
37: }
38: }
|