Homepage

netx.jnlp.cache
Class DefaultDownloadIndicator

java.lang.Object
  |
  +--netx.jnlp.cache.DefaultDownloadIndicator
All Implemented Interfaces:
DownloadIndicator

public class DefaultDownloadIndicator
extends java.lang.Object
implements DownloadIndicator

Show the progress of downloads.

Version:
$Revision: 1.3 $
Author:
Jon A. Maxwell (JAM) - initial author

Nested Class Summary
(package private) static class DefaultDownloadIndicator.DownloadPanel
          Groups the url progress in a panel.
(package private) static class DefaultDownloadIndicator.ProgressPanel
          A progress bar with the URL next to it.
 
Field Summary
(package private) static java.awt.GridBagConstraints vertical
          shared constraint
(package private) static java.awt.GridBagConstraints verticalIndent
           
 
Constructor Summary
DefaultDownloadIndicator()
           
 
Method Summary
 void disposeListener(javax.jnlp.DownloadServiceListener listener)
          Remove a download service listener that was obtained by calling the getDownloadListener method from the shared download info window.
 int getInitialDelay()
          Return the initial delay before obtaining a listener.
 javax.jnlp.DownloadServiceListener getListener(ApplicationInstance app, java.lang.String downloadName, java.net.URL[] resources)
          Return a download service listener that displays the progress in a shared download info window.
 int getUpdateRate()
          Return the update rate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vertical

static java.awt.GridBagConstraints vertical
shared constraint


verticalIndent

static java.awt.GridBagConstraints verticalIndent
Constructor Detail

DefaultDownloadIndicator

public DefaultDownloadIndicator()
Method Detail

getUpdateRate

public int getUpdateRate()
Return the update rate.

Specified by:
getUpdateRate in interface DownloadIndicator
Returns:
rate in milliseconds, must be >= 0

getInitialDelay

public int getInitialDelay()
Return the initial delay before obtaining a listener.

Specified by:
getInitialDelay in interface DownloadIndicator
Returns:
delay in milliseconds, must be >= 0

getListener

public javax.jnlp.DownloadServiceListener getListener(ApplicationInstance app,
                                                      java.lang.String downloadName,
                                                      java.net.URL[] resources)
Return a download service listener that displays the progress in a shared download info window.

Specified by:
getListener in interface DownloadIndicator
Parameters:
app - the downloading application, or null if N/A
downloadName - name identifying the download to the user
resources - initial urls to display (not required)

disposeListener

public void disposeListener(javax.jnlp.DownloadServiceListener listener)
Remove a download service listener that was obtained by calling the getDownloadListener method from the shared download info window.

Specified by:
disposeListener in interface DownloadIndicator
Parameters:
listener - the listener that is no longer in use

Homepage