Class ProgressTracker

java.lang.Object
com.esri.core.geometry.ProgressTracker

public abstract class ProgressTracker extends Object
A callback to provide progress and cancel tracking mechanism for lengthy operation.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Checks the tracker and throws UserCancelException if tracker is not null and progress returns false
    abstract boolean
    progress(int step, int totalExpectedSteps)
    Periodically called by a lengthy operation to check if the caller requested to cancel.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ProgressTracker

      public ProgressTracker()
  • Method Details

    • progress

      public abstract boolean progress(int step, int totalExpectedSteps)
      Periodically called by a lengthy operation to check if the caller requested to cancel.
      Parameters:
      step - The current step of the operation.
      totalExpectedSteps - is the number of steps the operation is expects to complete its task.
      Returns:
      true, if the operation can continue. Returns False, when the operation has to terminate due to a user cancelation.
    • checkAndThrow

      public static void checkAndThrow(ProgressTracker tracker)
      Checks the tracker and throws UserCancelException if tracker is not null and progress returns false
      Parameters:
      tracker - can be null, then the method does nothing.