Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2001-09-07 10:11:24 +0000
committerAndre Weinand2001-09-07 10:11:24 +0000
commit383a70abeb330dddc808105c77fd008158f6e720 (patch)
treec9b8c3f40f845a07fce81bbb491aec20dd4fdde8 /bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java
parentd69da0764757c80c3d96ffa2062db1076c9bf34a (diff)
downloadeclipse.platform.team-383a70abeb330dddc808105c77fd008158f6e720.tar.gz
eclipse.platform.team-383a70abeb330dddc808105c77fd008158f6e720.tar.xz
eclipse.platform.team-383a70abeb330dddc808105c77fd008158f6e720.zip
Lots of stuff
Diffstat (limited to 'bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java
index f9eeb4b54..b5c346228 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java
@@ -94,6 +94,7 @@ public class CompareConfiguration {
private Image fAncestorImage;
private Image fRightImage;
private Image fLeftImage;
+ private Image[] fImages= new Image[16];
/**
* Creates a new configuration with editable left and right sides,
@@ -111,6 +112,25 @@ public class CompareConfiguration {
}
/**
+ * Returns an image showing the specified change kind.
+ * The different kind of changes are defined in the <code>Differencer</code>.
+ * Newly created images are remembered by this class and
+ * disposed when the <code>dispose</code> method is called.
+ *
+ * @param kind the kind of change as defined in <code>Differencer</code>.
+ * @return an modification of the base image reflecting the kind of change.
+ * @see org.eclipse.compare.structuremergeviewer.Differencer
+ */
+ public Image getImage(int kind) {
+ Image image= fImages[kind & 15];
+ if (image == null) {
+ image= fgImages[kind & 15].createImage();
+ fImages[kind & 15]= image;
+ }
+ return image;
+ }
+
+ /**
* Returns an image showing the specified change kind applied to a
* given base image. The different kind of changes are defined in the <code>Differencer</code>.
* Typically an implementation would build a composite image

Back to the top