KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > core > NullSubProgressMonitor


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  *******************************************************************************/

11 package org.eclipse.team.internal.core;
12
13 import org.eclipse.core.runtime.IProgressMonitor;
14 import org.eclipse.core.runtime.SubProgressMonitor;
15
16 /**
17  * This sub-progress monitor can be used to ignore progress indication for
18  * methods but allow cancellation.
19  * <p>
20  * This implementation supports cancelation. The default implementations of the
21  * other methods do nothing.
22  * </p>
23  * @see SubProgressMonitor
24  */

25 public class NullSubProgressMonitor extends SubProgressMonitor {
26     /**
27      * Constructor for InfiniteSubProgressMonitor.
28      * @param monitor
29      */

30     public NullSubProgressMonitor(IProgressMonitor monitor) {
31         super(monitor, 0, 0);
32     }
33     
34     /**
35      * @see IProgressMonitor#beginTask(String, int)
36      */

37     public void beginTask(String JavaDoc name, int totalWork) {
38     }
39
40     /**
41      * @see IProgressMonitor#done()
42      */

43     public void done() {
44     }
45
46     /**
47      * @see IProgressMonitor#internalWorked(double)
48      */

49     public void internalWorked(double work) {
50     }
51
52     /**
53      * @see IProgressMonitor#subTask(String)
54      */

55     public void subTask(String JavaDoc name) {
56     }
57
58     /**
59      * @see IProgressMonitor#worked(int)
60      */

61     public void worked(int work) {
62     }
63 }
64
Popular Tags