Reputation: 2553
I want to add a progressbar to my RCP e4 application that only indicates that some bg-work is running. No progress report needed, just a rolling bar like below:
My question is how to do that? Do I need to implement this control myself? Thanks a lot!
Upvotes: 1
Views: 1704
Reputation: 111217
At the lowest level you can use the SWT ProgressBar
control with the SWT.INDETERMINATE
flag.
JFace extends this with the ProgressIndicator
class which supports both determinate and indeterminate bars. It extends this further with the ProgressMonitorPart
which provides a cancel button and implements the IProgressMonitorWithBlocking
interface.
If you are using Job
in e4 you need to hook up the UI progress bar to the job manager by setting the progress provider using:
Job.getJobManager().setProgressProvider(provider);
where provider
is a class extending ProgressProvider
. This class provides the job system with the progress monitor to use when jobs are running. This can be based on a ProgressMonitorPart
.
Upvotes: 2