public UpdaterDownloadListener(UpdateWindow w, HTTPDownloader d) { window = w; downloader = d; d.setProgressChangedEventHandler(new DownloadProgressChangedEventHandler(onProgressChanged)); d.setNewFileDownloadingEventHandler(new NewFileDownloadingEventHandler(OnNewFile)); d.setAllFileDownloadedEventHandler(new AllFileDownloadedEventHandler(OnAllFile)); }
public DownloadListener(PatcherWindow w, HTTPDownloader d) { window = w; downloader = d; baseCurrentSize = 0; totalSize = d.getTotalSize(); d.setProgressChangedEventHandler(new DownloadProgressChangedEventHandler(OnDownloadProgress)); d.setAfterNewFileEventHandler(new AfterFileDownloadedEventHandler(OnAfterNewFile)); d.setAllFileDownloadedEventHandler(new AllFileDownloadedEventHandler(allFileDownloaded)); }