KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > viewers > deferred > IConcurrentModelListener


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 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.deferred;
12
13 /**
14  * Interface for objects that can listen to changes in an IConcurrentModel.
15  * Elements in an IConcurrentModel are unordered.
16  *
17  * @since 3.1
18  */

19 public interface IConcurrentModelListener {
20     
21     /**
22      * Called when elements are added to the model
23      *
24      * @param added elements added to the model
25      */

26     public void add(Object JavaDoc[] added);
27     
28     /**
29      * Called when elements are removed from the model
30      *
31      * @param removed elements removed from the model
32      */

33     public void remove(Object JavaDoc[] removed);
34     
35     /**
36      * Called when elements in the model have changed
37      *
38      * @param changed elements that have changed
39      */

40     public void update(Object JavaDoc[] changed);
41     
42     /**
43      * Notifies the receiver about the complete set
44      * of elements in the model. Most models will
45      * not call this method unless the listener explicitly
46      * requests it by calling
47      * <code>IConcurrentModel.requestUpdate</code>
48      *
49      * @param newContents contents of the model
50      */

51     public void setContents(Object JavaDoc[] newContents);
52 }
53
Popular Tags