Class f_progressMonitor

Object
  extended by f_object
      extended by f_progressMonitor
Direct Known Subclasses:
f_subProgressMonitor

public class f_progressMonitor
extends f_object

Classe ProgressMonitor


Field Summary
static Number UNKNOWN
          Constant indicating an unknown amount of work.
 
Method Summary
 void f_beginTask(String name, Number totalWork)
          Notifies that the main task is beginning.
 void f_cancel()
          Cancel the progress monitor.
 void f_done()
          Notifies that the work is done; that is, either the main task is completed or the user canceled it.
 boolean f_isCanceled()
          Returns whether cancelation of current operation has been requested.
 void f_setTaskName(String name)
          Sets the task name to the given value.
 void f_subTask(String name)
          Notifies that a subtask of the main task is beginning.
 void f_worked(Number work)
          Notifies that a given number of work unit of the main task has been completed.
 
Methods inherited from class f_object
f_getClass, toString
 
Methods inherited from class Object
toString
 

Field Detail

UNKNOWN

public static final Number UNKNOWN
Constant indicating an unknown amount of work.

Method Detail

f_done

public void f_done()
Notifies that the work is done; that is, either the main task is completed or the user canceled it. This method may be called more than once (implementations should be prepared to handle this case).


f_worked

public void f_worked(Number work)
Notifies that a given number of work unit of the main task has been completed. Note that this amount represents an installment, as opposed to a cumulative amount of work done to date.

Parameters:
work - the number of work units just completed

f_beginTask

public void f_beginTask(String name,
                        Number totalWork)
Notifies that the main task is beginning. This must only be called once on a given progress monitor instance.

Parameters:
name - the name (or description) of the main task
totalWork - the total number of work units into which the main task is been subdivided. If the value is UNKNOWN the implementation is free to indicate progress in a way which doesn't require the total number of work units in advance.

f_cancel

public void f_cancel()
Cancel the progress monitor.

See Also:
#isCanceled()

f_subTask

public void f_subTask(String name)
Notifies that a subtask of the main task is beginning. Subtasks are optional; the main task might not have subtasks.

Parameters:
name - the name (or description) of the subtask

f_setTaskName

public void f_setTaskName(String name)
Sets the task name to the given value. This method is used to restore the task label after a nested operation was executed. Normally there is no need for clients to call this method.

Parameters:
name - the name (or description) of the main task
See Also:
#beginTask(java.lang.String,

f_isCanceled

public boolean f_isCanceled()
Returns whether cancelation of current operation has been requested. Long-running operations should poll to see if cancelation has been requested.

Returns:
true if cancellation has been requested, and false otherwise
See Also:
#setCanceled(boolean)