Interface IHMProgressMonitor

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int UNKNOWN
      Constant indicating an unknown amount of work.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> T adapt​(Class<T> adaptee)
      Adapts the monitor to a given class.
      void beginTask​(String name, int totalWork)
      Notifies that the main task is beginning.
      void done()
      Notifies that the work is done; that is, either the main task is completed or the user canceled it.
      void errorMessage​(String message)
      Sends out an error message.
      void exceptionThrown​(String message)
      Method to be called in case of exception.
      void internalWorked​(double work)
      Internal method to handle scaling correctly.
      boolean isCanceled()
      Returns whether cancellation of current operation has been requested.
      void message​(String message)
      Sends out a message.
      void onModuleExit()
      Method to call on module finalization.
      void setCanceled​(boolean value)
      Sets the cancel state to the given value.
      void setTaskName​(String name)
      Sets the task name to the given value.
      void subTask​(String name)
      Notifies that a subtask of the main task is beginning.
      void worked​(int work)
      Notifies that a given number of work unit of the main task has been completed.
    • Field Detail

      • UNKNOWN

        static final int UNKNOWN
        Constant indicating an unknown amount of work.
        See Also:
        Constant Field Values
    • Method Detail

      • beginTask

        void beginTask​(String name,
                       int totalWork)
        Notifies that the main task is beginning.
        Parameters:
        name -
        totalWork -
      • message

        void message​(String message)
        Sends out a message.
        Parameters:
        message - the message to send out.
      • errorMessage

        void errorMessage​(String message)
        Sends out an error message.
        Parameters:
        message - the error message to send out.
      • exceptionThrown

        void exceptionThrown​(String message)
        Method to be called in case of exception.
        Parameters:
        message - the error message to send out.
      • done

        void done()
        Notifies that the work is done; that is, either the main task is completed or the user canceled it.
      • internalWorked

        void internalWorked​(double work)
        Internal method to handle scaling correctly.
        Parameters:
        work -
      • isCanceled

        boolean isCanceled()
        Returns whether cancellation of current operation has been requested.
        Returns:
      • setCanceled

        void setCanceled​(boolean value)
        Sets the cancel state to the given value.
        Parameters:
        value -
      • setTaskName

        void setTaskName​(String name)
        Sets the task name to the given value.
        Parameters:
        name -
      • subTask

        void subTask​(String name)
        Notifies that a subtask of the main task is beginning.
        Parameters:
        name -
      • worked

        void worked​(int work)
        Notifies that a given number of work unit of the main task has been completed.
        Parameters:
        work -
      • adapt

        <T> T adapt​(Class<T> adaptee)
        Adapts the monitor to a given class.
        Parameters:
        adaptee - the class to which to adapt to.
        Returns:
        the adapted object or null, if it is not assignable.
      • onModuleExit

        void onModuleExit()
        Method to call on module finalization.