View Javadoc

1   /*
2    *******************************************************************************
3    * Copyright (c) 2005 Chris Rose and AIMedia
4    * All rights reserved. ProgressListener and the accompanying materials
5    * are made available under the terms of the Common Public License v1.0
6    * which accompanies this distribution, and is available at
7    * http://www.eclipse.org/legal/cpl-v10.html
8    * 
9    * Contributors:
10   *     Chris Rose
11   *******************************************************************************/
12  package ca.spaz.util;
13  
14  /***
15   * This interface should be implemented by classes interested in being informed of the
16   * progress of some other thread.
17   *  
18   * @author Chris Rose
19   */
20  public interface ProgressListener {
21  
22     /***
23      * This event is fired when the progress item being tracked starts.
24      */
25     void progressStart();
26     
27     /***
28      * This event is fired when the progress item being tracked finishes.  At this point,
29      * the item's progress should be considered to be 100%
30      */
31     void progressFinish();
32     
33     /***
34      * This event is fired whenever the progress item being tracked updates its public
35      * progress level.
36      * 
37      * @param percent A number from 0 to 100 indicating the progress of the tracked item.
38      */
39     void progress(int percent);
40     
41  }