Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-09-10 18:18:36 +0000
committerJean Michel-Lemieux2003-09-10 18:18:36 +0000
commita79cf367092adf84a9bd0f0d4496c40d805e5c10 (patch)
treedd0acf910e88f2c3d1745b10052ba3b91b84b24a
parent3139f347a7006419b4b7d94c2234e71187124879 (diff)
downloadeclipse.platform.team-a79cf367092adf84a9bd0f0d4496c40d805e5c10.tar.gz
eclipse.platform.team-a79cf367092adf84a9bd0f0d4496c40d805e5c10.tar.xz
eclipse.platform.team-a79cf367092adf84a9bd0f0d4496c40d805e5c10.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIcon.java80
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIconCache.java1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java2
3 files changed, 2 insertions, 81 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIcon.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIcon.java
deleted file mode 100644
index a7e0c4051..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIcon.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.util.Arrays;
-
-import org.eclipse.jface.resource.CompositeImageDescriptor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-
-/**
- * An OverlayIcon consists of a main icon and several adornments.
- */
-public abstract class OverlayIcon extends CompositeImageDescriptor {
- // the base image
- private Image base;
- // the overlay images
- private ImageDescriptor[] overlays;
- // the size
- private Point size;
- // the locations
- private int[] locations;
-
- public static final int TOP_LEFT = 0;
- public static final int TOP_RIGHT = 1;
- public static final int BOTTOM_LEFT = 2;
- public static final int BOTTOM_RIGHT = 3;
-
- /**
- * OverlayIcon constructor.
- *
- * @param base the base image
- * @param overlays the overlay images
- * @param locations the location of each image
- * @param size the size
- */
- public OverlayIcon(Image base, ImageDescriptor[] overlays, int[] locations, Point size) {
- this.base = base;
- this.overlays = overlays;
- this.locations = locations;
- this.size = size;
- }
- /**
- * Superclasses override to draw the overlays.
- */
- protected abstract void drawOverlays(ImageDescriptor[] overlays, int[] locations);
-
- public boolean equals(Object o) {
- if (! (o instanceof OverlayIcon)) return false;
- OverlayIcon other = (OverlayIcon) o;
- return base.equals(other.base) && Arrays.equals(overlays, other.overlays);
- }
-
- public int hashCode() {
- int code = base.hashCode();
- for (int i = 0; i < overlays.length; i++) {
- code ^= overlays[i].hashCode();
- }
- return code;
- }
-
-
- protected void drawCompositeImage(int width, int height) {
- drawImage(base.getImageData(), 0, 0);
- drawOverlays(overlays, locations);
- }
-
- protected Point getSize() {
- return size;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIconCache.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIconCache.java
index fc7baf14f..c6c06b12f 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIconCache.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIconCache.java
@@ -15,6 +15,7 @@ import java.util.Iterator;
import java.util.Map;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.team.internal.ui.*;
/**
* Maintains a cache of OverlayIcons.
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java
index 0c771623e..20b0255b7 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java
@@ -62,12 +62,12 @@ import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
import org.eclipse.team.internal.ccvs.ui.HistoryView;
import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.OverlayIcon;
import org.eclipse.team.internal.ccvs.ui.OverlayIconCache;
import org.eclipse.team.internal.ccvs.ui.Policy;
import org.eclipse.team.internal.ccvs.ui.merge.OverrideUpdateMergeAction;
import org.eclipse.team.internal.ccvs.ui.merge.UpdateMergeAction;
import org.eclipse.team.internal.ccvs.ui.merge.UpdateWithForcedJoinAction;
+import org.eclipse.team.internal.ui.OverlayIcon;
import org.eclipse.team.internal.ui.sync.CatchupReleaseViewer;
import org.eclipse.team.internal.ui.sync.ChangedTeamContainer;
import org.eclipse.team.internal.ui.sync.ITeamNode;

Back to the top