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.swt.graphics.Color;
14 import org.eclipse.swt.graphics.RGB;
18 * Manages SWT color objects for given color keys and
19 * given <code>RGB</code> objects. Until the <code>dispose</code>
20 * method is called, the same color object is returned for
21 * equal keys and equal <code>RGB</code> values.
23 * This interface may be implemented by clients.
26 * @see IJavaColorConstants
28 public interface IColorManager {
31 * Returns a color object for the given key. The color objects
32 * are remembered internally; the same color object is returned
35 * @param key the color key
36 * @return the color object for the given key
38 Color getColor(String key);
41 * Returns the color object for the value represented by the given
42 * <code>RGB</code> object.
44 * @param rgb the rgb color specification
45 * @return the color object for the given rgb value
47 Color getColor(RGB rgb);
50 * Disposes all color objects remembered by this color manager.