01: /*
02: * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
03: *
04: * http://izpack.org/
05: * http://izpack.codehaus.org/
06: *
07: * Copyright 2003 Tino Schwarze
08: *
09: * 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: * The action starts.
36: *
37: * @param name The name of the action.
38: * @param no_of_steps The number of steps the action consists of.
39: */
40: public void startAction(String name, int no_of_steps);
41:
42: /**
43: * The action was finished.
44: */
45: public void stopAction();
46:
47: /**
48: * The next step starts.
49: *
50: * @param step_name The name of the step which starts now.
51: * @param step_no The number of the step.
52: * @param no_of_substeps The number of sub-steps this step consists of.
53: */
54: public void nextStep(String step_name, int step_no,
55: int no_of_substeps);
56:
57: /**
58: * Set the number of substeps.
59: *
60: * This may be used if the number of substeps changes during an action.
61: *
62: * @param no_of_substeps The number of substeps.
63: */
64: public void setSubStepNo(int no_of_substeps);
65:
66: /**
67: * Notify of progress.
68: *
69: * @param substep_no The substep which will be performed next.
70: * @param message An additional message describing the substep.
71: */
72: public void progress(int substep_no, String message);
73:
74: }
|