01: /*******************************************************************************
02: * Copyright (c) 2005, 2007 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: * The ILazyContentProvider is the content provider
14: * for table viewers created using the SWT.VIRTUAL flag that
15: * only wish to return their contents as they are queried.
16: *
17: * <strong>NOTE:</strong> As the ILazyContentProvider does
18: * not have API for determining the total item count any
19: * changes to the number of items for this object while
20: * require a call to <code>#setItemCount</code> on the
21: * viewer that uses it.
22: */
23: public interface ILazyContentProvider extends IContentProvider {
24: /**
25: * Called when a previously-blank item becomes visible in the
26: * TableViewer. If the content provider knows the element
27: * at this row, it should respond by calling
28: * TableViewer#replace(Object, int).
29: *
30: * <strong>NOTE</strong> #updateElement(int index) can be used to determine selection
31: * values. TableViewer#replace(Object, int) is not called before
32: * returning from this method selections may have missing or stale elements.
33: * In this situation it is suggested that the selection is asked
34: * for again after he update.
35: *
36: * @param index The index that is being updated in the
37: * table.
38: */
39: public void updateElement(int index);
40:
41: }
|