01: /*******************************************************************************
02: * Copyright (c) 2004, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jface.viewers;
11:
12: /**
13: * Extends <code>IBaseLabelProvider</code> with the methods
14: * to update the label for a given element. The label is represented by a
15: * <code>ViewerLabel</code>.
16: * Unlike <code>ILabelProvider</code>, this allows the text and image to be
17: * set in the same request, rather than via separate requests.
18: * <p>
19: * It also allows the current values for the text and image to be considered by
20: * the label provider, allowing for potential optimizations.
21: * For example, decorating label providers that run in the background can hold off
22: * applying an update to a previously populated label until the decoration is ready,
23: * thereby reducing flicker.
24: * </p>
25: *
26: * @see IDelayedLabelDecorator
27: * @since 3.0
28: */
29: public interface IViewerLabelProvider extends IBaseLabelProvider {
30:
31: /**
32: * Updates the label for the given element.
33: *
34: * @param label the label to update
35: * @param element the element
36: */
37: public void updateLabel(ViewerLabel label, Object element);
38: }
|