KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > izforge > izpack > util > AbstractUIProgressHandler


1 /*
2  * IzPack - Copyright 2001-2007 Julien Ponge, All Rights Reserved.
3  *
4  * http://www.izforge.com/izpack/
5  * http://developer.berlios.de/projects/izpack/
6  *
7  * Copyright 2003 Tino Schwarze
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */

21
22 package com.izforge.izpack.util;
23
24 /**
25  * This interface is used by functions which need to notify the user of some progress.
26  *
27  * For example, the installation progress and compilation progress are communicated to the user
28  * using this interface. The interface supports a two-stage progress indication: The whole action is
29  * divided into steps (for example, packs when installing) and sub-steps (for example, files of a
30  * pack).
31  */

32 public interface AbstractUIProgressHandler extends AbstractUIHandler
33 {
34
35     /**
36      * The action starts.
37      *
38      * @param name The name of the action.
39      * @param no_of_steps The number of steps the action consists of.
40      */

41     public void startAction(String JavaDoc name, int no_of_steps);
42
43     /**
44      * The action was finished.
45      */

46     public void stopAction();
47
48     /**
49      * The next step starts.
50      *
51      * @param step_name The name of the step which starts now.
52      * @param step_no The number of the step.
53      * @param no_of_substeps The number of sub-steps this step consists of.
54      */

55     public void nextStep(String JavaDoc step_name, int step_no, int no_of_substeps);
56
57     /**
58      * Notify of progress.
59      *
60      * @param substep_no The substep which will be performed next.
61      * @param message An additional message describing the substep.
62      */

63     public void progress(int substep_no, String JavaDoc message);
64
65 }
66
Popular Tags