1 package net.sourceforge.phpeclipse.editors;
3 import java.util.HashMap;
4 import java.util.Iterator;
7 import org.eclipse.swt.graphics.Color;
8 import org.eclipse.swt.graphics.RGB;
9 import org.eclipse.swt.widgets.Display;
11 public class ColorManager
14 protected Map fColorTable = new HashMap(10);
18 Iterator e = fColorTable.values().iterator();
20 ((Color) e.next()).dispose();
22 public Color getColor(RGB rgb)
24 Color color = (Color) fColorTable.get(rgb);
27 color = new Color(Display.getCurrent(), rgb);
28 fColorTable.put(rgb, color);