KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > viewers > IViewerLabelProvider


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.jface.viewers;
12
13 /**
14  * Extends <code>IBaseLabelProvider</code> with the methods
15  * to update the label for a given element. The label is represented by a
16  * <code>ViewerLabel</code>.
17  * Unlike <code>ILabelProvider</code>, this allows the text and image to be
18  * set in the same request, rather than via separate requests.
19  * <p>
20  * It also allows the current values for the text and image to be considered by
21  * the label provider, allowing for potential optimizations.
22  * For example, decorating label providers that run in the background can hold off
23  * applying an update to a previously populated label until the decoration is ready,
24  * thereby reducing flicker.
25  * </p>
26  *
27  * @see IDelayedLabelDecorator
28  * @since 3.0
29  */

30 public interface IViewerLabelProvider extends IBaseLabelProvider {
31
32     /**
33      * Updates the label for the given element.
34      *
35      * @param label the label to update
36      * @param element the element
37      */

38     public void updateLabel(ViewerLabel label, Object JavaDoc element);
39 }
40
Popular Tags