Progress Monitor [message #816266] |
Thu, 08 March 2012 16:20 |
|
Do you guys have a code example for the use of a progress monitor?
This here is a service on the client side that uses a COM interface to talk to another application. I'd like to use a progress bar in indeterminate mode for the first part where I collect the ids and once I know how many ids I need to process, I'd like to switch to determinate mode.
List<Integer> ids = new ArrayList<Integer>();
int id = myGetFirst();
while (id >= 0) {
ids.add(id);
id = myGetNextAfter(id);
}
Iterator it = ids.iterator();
while (it.hasNext()) {
... do slow stuff here ...
}
|
|
|
Re: Progress Monitor [message #816919 is a reply to message #816266] |
Fri, 09 March 2012 12:22 |
|
For a moment I thought that SimpleProgress was the solution I was looking for...
ISimpleProgress progress = SERVICES.getService(ISimpleProgressService.class).addProgress("Test");
progress.setProgress(0);
try {
Thread.sleep(1000);
progress.setProgress(0.25f);
Thread.sleep(1000);
progress.setProgress(0.5f);
Thread.sleep(1000);
progress.setProgress(0.75f);
Thread.sleep(1000);
progress.setProgress(1);
}
catch (InterruptedException e) {
}
Unfortunately I see no effect. I'm using Rayo. Maybe related?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01961 seconds