public class ModuleDownloadProgressMonitor extends java.lang.Object implements ModuleManagerEventListener
Constructor and Description |
---|
ModuleDownloadProgressMonitor(java.awt.Container parent)
constructor
|
Modifier and Type | Method and Description |
---|---|
void |
downloadBegin(int totalSize,
java.lang.String moduleName)
start up a new progress monitor at the beginning of a download.
|
void |
downloadEnd()
close the progress monitor at the end of the DL.
|
void |
unzipBegin(long totalSize,
java.lang.String moduleName)
create a new progress bar when an unzip begins
|
void |
unzipEnd()
get rid of the unzip progress bar
|
void |
unzipUpdateProgress(long totalSize,
int bufferSize,
int readCount)
update the progress of an unzip
|
void |
updateProgress(int totalSize,
int bufferSize,
int readCount,
java.io.InputStream is)
update progress for the progress monitor
|
public ModuleDownloadProgressMonitor(java.awt.Container parent)
parent
- the parent gui objectpublic void updateProgress(int totalSize, int bufferSize, int readCount, java.io.InputStream is)
updateProgress
in interface ModuleManagerEventListener
totalSize
- the total size of the transfer. -1 if not knownbufferSize
- the size of each buffered transfer. -1 if this is not a
buffered transferreadCount
- the number of times bufferSize has been read.is
- the inputStream being readpublic void downloadEnd()
downloadEnd
in interface ModuleManagerEventListener
public void downloadBegin(int totalSize, java.lang.String moduleName)
downloadBegin
in interface ModuleManagerEventListener
totalSize
- the total size of the download. -1 if unknown.moduleName
- the name of the module beginning to downloadpublic void unzipBegin(long totalSize, java.lang.String moduleName)
unzipBegin
in interface ModuleManagerEventListener
totalSize
- total size of the zip filemoduleName
- the name of the module unzippingpublic void unzipEnd()
unzipEnd
in interface ModuleManagerEventListener
public void unzipUpdateProgress(long totalSize, int bufferSize, int readCount)
unzipUpdateProgress
in interface ModuleManagerEventListener
totalSize
- total size of the zip filebufferSize
- size of each buffer in the zip entryreadCount
- number of bufferSize'd buffers that have been read