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;
18 * Manages SWT color objects for given color keys and given <code>RGB</code>
19 * objects. Until the <code>dispose</code> method is called, the same color
20 * object is returned for equal keys and equal <code>RGB</code> values.
22 * This interface may be implemented by clients.
25 * @see IJavaColorConstants
27 public interface IColorManager extends ISharedTextColors {
30 * Returns a color object for the given key. The color objects are
31 * remembered internally; the same color object is returned for equal keys.
35 * @return the color object for the given key
37 Color getColor(String key);
40 * Returns the color object for the value represented by the given
41 * <code>RGB</code> object.
44 * 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.