org.xnap.gui.component
Interface ProgressMonitor

All Known Subinterfaces:
PackageInstallerListener
All Known Implementing Classes:
PackageInstallerDialog, PluginInstallerDialog, ProgressDialog, ProgressMonitorAdapter, TextProgressMonitor

public interface ProgressMonitor

Defines the requirements for classes that monitor operations to display user visible feedback.


Method Summary
 void done()
          Invoked when the operation has completed.
 boolean isCancelled()
          Returns true, if the opertion has been cancelled by the user.
 void setCancelEnabled(boolean enabled)
          Enables the cancel button.
 void setMaximum(int max)
          Sets the maximum value.
 void setMinimum(int min)
          Sets the minimum value.
 void setPercent(double percent)
          Sets the percentage that has been completed.
 void setText(java.lang.String text)
          Sets the message text.
 void setThread(java.lang.Thread thread)
          Associates a thread with the progress monitor.
 void setValue(int value)
          Sets the current value.
 

Method Detail

done

void done()
Invoked when the operation has completed. This is always called last.


isCancelled

boolean isCancelled()
Returns true, if the opertion has been cancelled by the user.


setCancelEnabled

void setCancelEnabled(boolean enabled)
Enables the cancel button.


setMaximum

void setMaximum(int max)
Sets the maximum value.


setMinimum

void setMinimum(int min)
Sets the minimum value.


setPercent

void setPercent(double percent)
Sets the percentage that has been completed.


setValue

void setValue(int value)
Sets the current value.

Parameters:
value - min <= value <= max

setText

void setText(java.lang.String text)
Sets the message text.


setThread

void setThread(java.lang.Thread thread)
Associates a thread with the progress monitor. The monitor is supposed to call thread.interrupt() when the user cancels the operation.



Copyright © 2001-2005 XNap Team. All Rights Reserved.