1 21 22 package com.izforge.izpack.event; 23 24 import com.izforge.izpack.installer.AutomatedInstallData; 25 import com.izforge.izpack.util.AbstractUIProgressHandler; 26 import com.izforge.izpack.util.Debug; 27 import com.izforge.izpack.util.ExtendedUIProgressHandler; 28 29 37 public class ProgressBarInstallerListener extends SimpleInstallerListener 38 { 39 40 43 public ProgressBarInstallerListener() 44 { 45 super(false); 46 } 48 49 55 public void afterPacks(AutomatedInstallData idata, AbstractUIProgressHandler handler) 56 throws Exception 57 { 58 if (handler instanceof ExtendedUIProgressHandler && getProgressBarCallerCount() > 0) 59 { 60 String progress = getMsg("CustomActions.progress"); 61 String tip = getMsg("CustomActions.tip"); 62 if ("CustomActions.tip".equals(tip) || "CustomActions.progress".equals(progress)) 63 { 64 Debug 65 .trace("No messages found for custom action progress bar interactions; skiped."); 66 return; 67 } 68 ((ExtendedUIProgressHandler) handler).restartAction("Configure", progress, tip, 69 getProgressBarCallerCount()); 70 SimpleInstallerListener.doInformProgressBar = true; 71 } 72 } 73 74 } 75 | Popular Tags |