KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > ui > text > IColorManager


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.ui.text;
12
13 import org.eclipse.swt.graphics.Color;
14 import org.eclipse.jface.text.source.ISharedTextColors;
15
16
17 /**
18  * Manages SWT color objects for the 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.
22  * <p>
23  * In order to provide backward compatibility for clients of <code>IColorManager</code>, extension
24  * interfaces are used to provide a means of evolution. The following extension interfaces exist:
25  * <ul>
26  * <li>{@link org.eclipse.jdt.ui.text.IColorManagerExtension} since version 2.0 introducing
27  * the ability to bind and un-bind colors.</li>
28  * </ul>
29  * </p>
30  * <p>
31  * This interface may be implemented by clients.
32  * </p>
33  *
34  * @see org.eclipse.jdt.ui.text.IColorManagerExtension
35  * @see org.eclipse.jdt.ui.text.IJavaColorConstants
36  */

37 public interface IColorManager extends ISharedTextColors {
38
39     /**
40      * Returns a color object for the given key. The color objects
41      * are remembered internally; the same color object is returned
42      * for equal keys.
43      *
44      * @param key the color key
45      * @return the color object for the given key
46      */

47     Color getColor(String JavaDoc key);
48 }
49
Popular Tags