1 /*******************************************************************************
2 * Copyright (c) 2000, 2001 International Business Machines Corp. and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 ******************************************************************************/
11 package net.sourceforge.phpdt.ui.text;
13 import org.eclipse.jface.text.source.ISharedTextColors;
14 import org.eclipse.swt.graphics.Color;
15 import org.eclipse.swt.graphics.RGB;
19 * Manages SWT color objects for given color keys and
20 * given <code>RGB</code> objects. Until the <code>dispose</code>
21 * method is called, the same color object is returned for
22 * equal keys and equal <code>RGB</code> values.
24 * This interface may be implemented by clients.
27 * @see IJavaColorConstants
29 public interface IColorManager extends ISharedTextColors {
32 * Returns a color object for the given key. The color objects
33 * are remembered internally; the same color object is returned
36 * @param key the color key
37 * @return the color object for the given key
39 Color getColor(String key);
42 * Returns the color object for the value represented by the given
43 * <code>RGB</code> object.
45 * @param rgb the rgb color specification
46 * @return the color object for the given rgb value
48 Color getColor(RGB rgb);
51 * Disposes all color objects remembered by this color manager.