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