maspack.fileutil
Class ProgressBarTransferListener

java.lang.Object
  extended by maspack.fileutil.ProgressBarTransferListener
All Implemented Interfaces:
FileTransferListener

public class ProgressBarTransferListener
extends java.lang.Object
implements FileTransferListener

A that sets up a progress bar to monitor file transfer progress.


Constructor Summary
ProgressBarTransferListener(java.lang.String messagePrefix, java.awt.Window window)
           
 
Method Summary
 double getLaunchDelay()
          Returns the time in seconds that we should wait before launching the progress panel.
 double getLaunchThreshold()
          Returns the ETA in seconds required to launch the progress panel.
 void setLaunchDelay(double delay)
          Sets the time in seconds that we should wait before launching the progress panel.
 void setLaunchThreshold(double eta)
          Sets the ETA in seconds required to launch the progress panel.
 void transferCompleted(FileTransferEvent event)
          Called when the file transfer is done.
 void transferStarted(FileTransferEvent event)
          Called when the file transfer begins.
 void transferUpdated(FileTransferEvent event)
          Called while the file transfer is in progress.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressBarTransferListener

public ProgressBarTransferListener(java.lang.String messagePrefix,
                                   java.awt.Window window)
Method Detail

getLaunchDelay

public double getLaunchDelay()
Returns the time in seconds that we should wait before launching the progress panel.


setLaunchDelay

public void setLaunchDelay(double delay)
Sets the time in seconds that we should wait before launching the progress panel.


getLaunchThreshold

public double getLaunchThreshold()
Returns the ETA in seconds required to launch the progress panel.


setLaunchThreshold

public void setLaunchThreshold(double eta)
Sets the ETA in seconds required to launch the progress panel.


transferUpdated

public void transferUpdated(FileTransferEvent event)
Called while the file transfer is in progress.

Specified by:
transferUpdated in interface FileTransferListener

transferStarted

public void transferStarted(FileTransferEvent event)
Called when the file transfer begins.

Specified by:
transferStarted in interface FileTransferListener

transferCompleted

public void transferCompleted(FileTransferEvent event)
Called when the file transfer is done.

Specified by:
transferCompleted in interface FileTransferListener