KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > model > IWorkbenchAdapter2


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.model;
12
13 import org.eclipse.swt.graphics.FontData;
14 import org.eclipse.swt.graphics.RGB;
15
16 /**
17  * Extension interface for <code>IWorkbenchAdapter</code> that allows for color
18  * and font support.
19  * <p>
20  * There is an associate label provider and content provider for showing
21  * elements with a registered workbench adapter in JFace structured viewers.
22  * </p>
23  * @see IWorkbenchAdapter
24  * @see WorkbenchLabelProvider
25  * @see BaseWorkbenchContentProvider
26  * @since 3.0
27  */

28 public interface IWorkbenchAdapter2 {
29
30     /**
31      * Provides a foreground color for the given element.
32      *
33      * @param element the element
34      * @return the foreground color for the element, or <code>null</code>
35      * to use the default foreground color
36      */

37     public RGB getForeground(Object JavaDoc element);
38
39     /**
40      * Provides a background color for the given element.
41      *
42      * @param element the element
43      * @return the background color for the element, or <code>null</code>
44      * to use the default background color
45      */

46     public RGB getBackground(Object JavaDoc element);
47
48     /**
49      * Provides a font the given element.
50      *
51      * @param element the element
52      * @return the font for the element, or <code>null</code>
53      * to use the default font
54      */

55     public FontData getFont(Object JavaDoc element);
56
57 }
58
Popular Tags