de.hunsicker.jalopy.swing
Interface ProgressMonitor


public interface ProgressMonitor

Common interface for objects that monitor the progress of an operation.

Version:
$Revision: 1.2 $
Author:
Marco Hunsicker

Method Summary
 void begin(java.lang.String text, int units)
          Begins the monitoring of an operation.
 void done()
          Notifies that the worker is done.
 int getProgress()
          Returns the amount of work units done.
 boolean isCanceled()
          Indicates whether the user canceled the monitored operation.
 void setCanceled(boolean state)
          Sets the canceled state to the given value.
 void setProgress(int units)
          Sets amount of work units done to units.
 void setText(java.lang.String text)
          Sets the description to be displayed.
 

Method Detail

setCanceled

public void setCanceled(boolean state)
Sets the canceled state to the given value.

Parameters:
state - true to request a cancelation of the monitored operation.

isCanceled

public boolean isCanceled()
Indicates whether the user canceled the monitored operation.

Returns:
true if the user canceled the monitored operation.

setProgress

public void setProgress(int units)
Sets amount of work units done to units.

Parameters:
units - the amount of work units done.

getProgress

public int getProgress()
Returns the amount of work units done.

Returns:
the amount of work units done.

setText

public void setText(java.lang.String text)
Sets the description to be displayed.

Parameters:
text - description to be displayed.

begin

public void begin(java.lang.String text,
                  int units)
Begins the monitoring of an operation.

Parameters:
text - description to be displayed.
units - amount of work units to be done.

done

public void done()
Notifies that the worker is done. Indicates that either the operation is completed or the user canceled it.

See Also:
setCanceled(boolean)


Copyright © 1997-2005 Jalopy. All Rights Reserved.