01: package net.refractions.udig.ui;
02:
03: import org.eclipse.core.runtime.IProgressMonitor;
04: import org.eclipse.core.runtime.SubProgressMonitor;
05:
06: /**
07: * A SubprogressMonitor that also changes the current task name when begin Task is called.
08: *
09: * @author Jesse
10: * @since 1.1.0
11: */
12: public class ProgressMonitorTaskNamer extends SubProgressMonitor {
13:
14: public ProgressMonitorTaskNamer(IProgressMonitor monitor, int ticks) {
15: super (monitor, ticks);
16: }
17:
18: @Override
19: public void beginTask(String name, int totalWork) {
20: super.beginTask(name, totalWork);
21: setTaskName(name);
22: }
23:
24: }
|