001/* 002 * IzPack - Copyright 2001-2005 Julien Ponge, All Rights Reserved. 003 * 004 * http://www.izforge.com/izpack/ 005 * http://developer.berlios.de/projects/izpack/ 006 * 007 * Copyright 2003 Tino Schwarze 008 * 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 */ 021 022package com.izforge.izpack.util; 023 024/** 025 * This interface is used by functions which need to notify the user of some progress. 026 * 027 * For example, the installation progress and compilation progress are communicated to the user 028 * using this interface. The interface supports a two-stage progress indication: The whole action is 029 * divided into steps (for example, packs when installing) and sub-steps (for example, files of a 030 * pack). 031 */ 032public interface AbstractUIProgressHandler extends AbstractUIHandler 033{ 034 035 /** 036 * The action starts. 037 * 038 * @param name The name of the action. 039 * @param no_of_steps The number of steps the action consists of. 040 */ 041 public void startAction(String name, int no_of_steps); 042 043 /** 044 * The action was finished. 045 */ 046 public void stopAction(); 047 048 /** 049 * The next step starts. 050 * 051 * @param step_name The name of the step which starts now. 052 * @param step_no The number of the step. 053 * @param no_of_substeps The number of sub-steps this step consists of. 054 */ 055 public void nextStep(String step_name, int step_no, int no_of_substeps); 056 057 /** 058 * Notify of progress. 059 * 060 * @param substep_no The substep which will be performed next. 061 * @param message An additional message describing the substep. 062 */ 063 public void progress(int substep_no, String message); 064 065}