コード例 #1
0
 protected void _setMessage(String message) {
   if (currentSubTaskMessage.length() > 0) {
     message = currentSubTaskMessage + (message.length() > 0 ? ": " + message : "");
     // concatentate the parent message and the sub-task messages. Previous behaviour was
     // just to overwrite the parent sub-task message, but I think this is just wrong.
   }
   listener._setMessage(message);
 }
コード例 #2
0
 protected void _setProgress(double fractionCompleted) {
   if (fractionCompleted > 1.0000001) { // Allow 1.0000001 to handle rounding errors
     assert false : "Progress should be <= 1.  Passed in " + fractionCompleted;
   }
   if (fractionCompleted > 1) fractionCompleted = 1;
   if (fractionCompleted < currentOperationProgress) {
     assert false
         : "Progress shouldn't go backwards. Went from "
             + currentOperationProgress
             + " to "
             + fractionCompleted;
   }
   if (fractionCompleted < 0) {
     assert false : "Progress must be >=0 but got " + fractionCompleted;
   }
   currentOperationProgress = fractionCompleted;
   listener._setProgress(baseTime + fractionCompleted * getTaskFraction(currentOperationNum));
 }
コード例 #3
0
 public boolean isCanceled() {
   return listener.isCanceled();
 }
コード例 #4
0
 protected void _setIndeterminateProgress() {
   listener._setIndeterminateProgress();
 }