diff options
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java')
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java index a09ae6d0b..c1255ac30 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2000, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,7 +12,6 @@ package org.eclipse.debug.internal.ui; import java.util.HashMap; -import java.util.Iterator; import java.util.Map; import org.eclipse.swt.graphics.Color; @@ -36,10 +35,10 @@ public class ColorManager { return fgColorManager; } - protected Map fColorTable= new HashMap(10); + protected Map<RGB, Color> fColorTable = new HashMap<RGB, Color>(10); public Color getColor(RGB rgb) { - Color color= (Color) fColorTable.get(rgb); + Color color= fColorTable.get(rgb); if (color == null) { color= new Color(Display.getCurrent(), rgb); fColorTable.put(rgb, color); @@ -48,9 +47,9 @@ public class ColorManager { } public void dispose() { - Iterator e= fColorTable.values().iterator(); - while (e.hasNext()) - ((Color) e.next()).dispose(); + for (Color color : fColorTable.values()) { + color.dispose(); + } } } |