Mercurial > projects > dwt-addons
comparison dwtx/jface/viewers/IContentProvider.d @ 10:b6c35faf97c8
Viewers
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 31 Mar 2008 00:47:19 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9:6c14e54dfc11 | 10:b6c35faf97c8 |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2000, 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 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module dwtx.jface.viewers.IContentProvider; | |
14 | |
15 import dwtx.jface.viewers.Viewer; | |
16 | |
17 /** | |
18 * A content provider mediates between the viewer's model | |
19 * and the viewer itself. | |
20 * | |
21 * @see dwtx.jface.viewers.ContentViewer#setContentProvider(IContentProvider) | |
22 */ | |
23 public interface IContentProvider { | |
24 /** | |
25 * Disposes of this content provider. | |
26 * This is called by the viewer when it is disposed. | |
27 * <p> | |
28 * The viewer should not be updated during this call, as it is in the process | |
29 * of being disposed. | |
30 * </p> | |
31 */ | |
32 public void dispose(); | |
33 | |
34 /** | |
35 * Notifies this content provider that the given viewer's input | |
36 * has been switched to a different element. | |
37 * <p> | |
38 * A typical use for this method is registering the content provider as a listener | |
39 * to changes on the new input (using model-specific means), and deregistering the viewer | |
40 * from the old input. In response to these change notifications, the content provider | |
41 * should update the viewer (see the add, remove, update and refresh methods on the viewers). | |
42 * </p> | |
43 * <p> | |
44 * The viewer should not be updated during this call, as it might be in the process | |
45 * of being disposed. | |
46 * </p> | |
47 * | |
48 * @param viewer the viewer | |
49 * @param oldInput the old input element, or <code>null</code> if the viewer | |
50 * did not previously have an input | |
51 * @param newInput the new input element, or <code>null</code> if the viewer | |
52 * does not have an input | |
53 */ | |
54 public void inputChanged(Viewer viewer, Object oldInput, Object newInput); | |
55 } |