KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > progress > IElementCollector


1 /*******************************************************************************
2  * Copyright (c) 2003, 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.ui.progress;
12
13 import org.eclipse.core.runtime.IProgressMonitor;
14
15 /**
16  * IElementCollector is a type that allows for the incremental update of a
17  * collection of objects. This used for updating trees incrementally with
18  * a progress monitor so that the update can be reported.
19  *
20  * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter
21  * @see org.eclipse.ui.progress.DeferredTreeContentManager
22  * @since 3.0
23  */

24 public interface IElementCollector {
25     /**
26      * Add the element to the IElementCollector. Send any progress information
27      * to monitor.
28      *
29      * @param element
30      * The element being added
31      * @param monitor
32      * The monitor to send updates to.
33      */

34     public void add(Object JavaDoc element, IProgressMonitor monitor);
35
36     /**
37      * Add the elements to the IElementCollector. Send any progress information
38      * to monitor.
39      *
40      * @param elements
41      * The elements being added
42      * @param monitor
43      * The monitor to send updates to.
44      */

45     public void add(Object JavaDoc[] elements, IProgressMonitor monitor);
46
47     /**
48      * The element collection is done. Clean up any temporary state.
49      *
50      */

51     public void done();
52 }
53
Popular Tags