KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 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  * The ILazyContentProvider is the content provider
15  * for table viewers created using the SWT.VIRTUAL flag that
16  * only wish to return their contents as they are queried.
17  *
18  * <strong>NOTE:</strong> As the ILazyContentProvider does
19  * not have API for determining the total item count any
20  * changes to the number of items for this object while
21  * require a call to <code>#setItemCount</code> on the
22  * viewer that uses it.
23  */

24 public interface ILazyContentProvider extends IContentProvider {
25     /**
26      * Called when a previously-blank item becomes visible in the
27      * TableViewer. If the content provider knows the element
28      * at this row, it should respond by calling
29      * TableViewer#replace(Object, int).
30      *
31      * <strong>NOTE</strong> #updateElement(int index) can be used to determine selection
32      * values. TableViewer#replace(Object, int) is not called before
33      * returning from this method selections may have missing or stale elements.
34      * In this situation it is suggested that the selection is asked
35      * for again after he update.
36      *
37      * @param index The index that is being updated in the
38      * table.
39      */

40     public void updateElement(int index);
41     
42 }
43
Popular Tags