org.ka2ddo.yaac.core
Interface StatusListener

All Known Implementing Classes:
ProgressDialog

public interface StatusListener

This interface defines something that can display the current status of an ongoing long-running operation.


Method Summary
 boolean isOperationComplete()
          Test whether the operation monitored by this StatusListener is done.
 void setOperationComplete()
          Report that the long-running operation is done.
 void show()
          Make a modal StatusListener visible.
 void updateMessage(java.lang.String msg)
          Update the status message for this operation.
 void updateProgress(double percent)
          Update the progress percentage for this operation.
 void updateStatus(java.lang.String msg, double percent)
          Update the status message and progress percentage for this operation.
 void updateStatusSynchronously(java.lang.String msg, double percent)
          Update the status message and progress percentage for this operation, blocking until the GUI is updated.
 

Method Detail

updateMessage

void updateMessage(java.lang.String msg)
                   throws UserAbort
Update the status message for this operation.

Parameters:
msg - String message to display
Throws:
UserAbort - if user wants to stop long-running operation

updateProgress

void updateProgress(double percent)
                    throws UserAbort
Update the progress percentage for this operation.

Parameters:
percent - percent complete in the range 0 to 100.
Throws:
UserAbort - if user wants to stop long-running operation

updateStatus

void updateStatus(java.lang.String msg,
                  double percent)
                  throws UserAbort
Update the status message and progress percentage for this operation.

Parameters:
msg - String message to display
percent - percent complete in the range 0 to 100.
Throws:
UserAbort - if user wants to stop long-running operation

updateStatusSynchronously

void updateStatusSynchronously(java.lang.String msg,
                               double percent)
                               throws UserAbort
Update the status message and progress percentage for this operation, blocking until the GUI is updated.

Parameters:
msg - String message to display
percent - percent complete in the range 0 to 100.
Throws:
UserAbort - if user wants to stop long-running operation

setOperationComplete

void setOperationComplete()
Report that the long-running operation is done.


isOperationComplete

boolean isOperationComplete()
Test whether the operation monitored by this StatusListener is done. Used to allow one thread to test the result of another thread's execution.

Returns:
boolean true if operation has been reported complete

show

void show()
Make a modal StatusListener visible.