KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > themes > IColorFactory


1 /*******************************************************************************
2  * Copyright (c) 2004, 2006 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.ui.themes;
12
13 import org.eclipse.swt.graphics.RGB;
14
15 /**
16  * A factory interface that may be used to specify a color value. This is
17  * (optionally) used by the themes extension point for color value
18  * definitions.
19  * <p>
20  * Example usage:
21  * <br/>
22  * <code>
23  * &lt;colorDefinition
24  * label="Custom Color"
25  * id="example.customColor"
26  * colorFactory="some.implementor.of.IColorFactory"&gt;
27  * &lt;/colorDefinition&gt;
28  * </code>
29  * </p>
30  *
31  * @since 3.0
32  */

33 public interface IColorFactory {
34
35     /**
36      * Create a new color.
37      *
38      * @return a new color. This must never be <code>null</code>.
39      */

40     RGB createColor();
41 }
42
Popular Tags