1 /*******************************************************************************
2 * Copyright (c) 2000, 2006 IBM Corporation and others.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * IBM Corporation - initial API and implementation
11 *******************************************************************************/
12 package org
.spearce
.jgit
.lib
;
15 * A progress monitor. A ripoff of IProgressMonitor.
17 public interface ProgressMonitor
{
23 void setTask(String message
);
31 * Set the total expected amount of work
35 void setTotalWork(int work
);
38 * @return amount worked so far
45 void worked(int work
);
48 * @return total expected amount of work
53 * Indicate the task is completed.
58 * @return true if done.
63 * @return true if cancel has been requested.
65 boolean isCancelled();
68 * Request the task to be cancelled
72 void setCancelled(boolean cancelled
);
80 void beginTask(String task
, int total
);