Package jetbrains.mps.progress
Class ProgressMonitorDecorator
- java.lang.Object
 - 
- jetbrains.mps.progress.ProgressMonitorDecorator
 
 
- 
- All Implemented Interfaces:
 ProgressMonitor
public class ProgressMonitorDecorator extends Object implements ProgressMonitor
 
- 
- 
Constructor Summary
Constructors Constructor Description ProgressMonitorDecorator(ProgressMonitor delegate) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadvance(int work)Advance by the given number of work items.voidcancel()voiddone()Completes the monitoringbooleanisCanceled()voidstart(String taskName, int totalWork)Starts monitoring, can only be called once.voidstep(String title)Indicates a new step to mention in the progress dialogProgressMonitorsubTask(int work)Creates a monitor for a sub-task, which, when accomplished, will complete the given number of work items of the current monitor.ProgressMonitorsubTask(int work, SubProgressKind kind)Creates a monitor for a sub-task, which, when accomplished, will complete the given number of work items of the current monitor. 
 - 
 
- 
- 
Constructor Detail
- 
ProgressMonitorDecorator
public ProgressMonitorDecorator(ProgressMonitor delegate)
 
 - 
 
- 
Method Detail
- 
start
public void start(@NotNull String taskName, int totalWork)
Description copied from interface:ProgressMonitorStarts monitoring, can only be called once.- Specified by:
 startin interfaceProgressMonitor- Parameters:
 taskName- The text to display in the progress dialog header, must not be null, can be an empty string, e.g. to keep the amount of text in the progress dialog lowtotalWork- The amount of work items to finish before completion, can be 0, in which case no advances are possible
 
- 
advance
public void advance(int work)
Description copied from interface:ProgressMonitorAdvance by the given number of work items.- Specified by:
 advancein interfaceProgressMonitor- Parameters:
 work- The number of work items accomplished, 0 is allowed and can be used as a way to complete an unfinished sub-task's monitor
 
- 
step
public void step(String title)
Description copied from interface:ProgressMonitorIndicates a new step to mention in the progress dialog- Specified by:
 stepin interfaceProgressMonitor- Parameters:
 title- The text to show in the progress dialog
 
- 
done
public void done()
Description copied from interface:ProgressMonitorCompletes the monitoring- Specified by:
 donein interfaceProgressMonitor
 
- 
isCanceled
public boolean isCanceled()
- Specified by:
 isCanceledin interfaceProgressMonitor
 
- 
cancel
public void cancel()
- Specified by:
 cancelin interfaceProgressMonitor
 
- 
subTask
public ProgressMonitor subTask(int work)
Description copied from interface:ProgressMonitorCreates a monitor for a sub-task, which, when accomplished, will complete the given number of work items of the current monitor. At most one sub-task can be active for a given task at any moment.- Specified by:
 subTaskin interfaceProgressMonitor- Parameters:
 work- The number of work items to advance the current monitor when the sub-task completes- Returns:
 - The progress monitor for the sub-task.
 
 
- 
subTask
public ProgressMonitor subTask(int work, SubProgressKind kind)
Description copied from interface:ProgressMonitorCreates a monitor for a sub-task, which, when accomplished, will complete the given number of work items of the current monitor. At most one sub-task can be active for a given task at any moment.- Specified by:
 subTaskin interfaceProgressMonitor- Parameters:
 work- The number of work items to advance the current monitor when the sub-task completeskind- Specifies whether and how textual information from the sub-task's monitor will be propagated onto the progress dialog- Returns:
 - The progress monitor for the sub-task.
 
 
 - 
 
 -