diff options
author | Darin Swanson | 2004-03-11 21:58:35 +0000 |
---|---|---|
committer | Darin Swanson | 2004-03-11 21:58:35 +0000 |
commit | a250de96156ac352ea9aa816deafbf29dd00b54f (patch) | |
tree | 538107dba789544a51ac126e17b44f8a83e3a490 /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java | |
parent | 540d964a02b50cc2ada5c38f9fe695c8bd6f86db (diff) | |
download | eclipse.platform.debug-a250de96156ac352ea9aa816deafbf29dd00b54f.tar.gz eclipse.platform.debug-a250de96156ac352ea9aa816deafbf29dd00b54f.tar.xz eclipse.platform.debug-a250de96156ac352ea9aa816deafbf29dd00b54f.zip |
Bug 48933 - Move to use the Platform UI color support
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 | 57 |
1 files changed, 0 insertions, 57 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 deleted file mode 100644 index c15bc0183..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java +++ /dev/null @@ -1,57 +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.debug.internal.ui; - - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.RGB; -import org.eclipse.swt.widgets.Display; - -/** - * Generic color manager. - */ -public class ColorManager { - - private static ColorManager fgColorManager; - - private ColorManager() { - } - - public static ColorManager getDefault() { - if (fgColorManager == null) { - fgColorManager= new ColorManager(); - } - return fgColorManager; - } - - protected Map fColorTable= new HashMap(10); - - public Color getColor(RGB rgb) { - Color color= (Color) fColorTable.get(rgb); - if (color == null) { - color= new Color(Display.getCurrent(), rgb); - fColorTable.put(rgb, color); - } - return color; - } - - public void dispose() { - Iterator e= fColorTable.values().iterator(); - while (e.hasNext()) - ((Color) e.next()).dispose(); - } -} - - |