Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » Progress Monitor
Progress Monitor [message #816266] Thu, 08 March 2012 11:20 Go to next message
Eclipse UserFriend
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 07:22 Go to previous messageGo to next message
Eclipse UserFriend
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?
Re: Progress Monitor [message #816950 is a reply to message #816919] Fri, 09 March 2012 08:03 Go to previous messageGo to next message
Eclipse UserFriend
Hi Alex,

The rayo look and feel does by default not style the progress widget and has the status line disabled due to its design guide.
To enable it the following would do, but there will be no progress widget unless it is styled in the rayo.xml swing synth css file...
public class RayoSwingEnvironmentEx extends RayoSwingEnvironment {

  @Override
  public void interceptUIDefaults(UIDefaults defaults) {
    super.interceptUIDefaults(defaults);
    defaults.put("StatusBar.visible", true);
  }
}


Note that the rayo look and feel is not part of the eclipse scout official distribution and does not fully style all available swing widgets.

The progress with simple progress works fine in the official swing (Nimbus etc.) look and feels as well as in orson Look and F.
Re: Progress Monitor [message #816998 is a reply to message #816950] Fri, 09 March 2012 09:03 Go to previous message
Eclipse UserFriend
Thanks. I'll will try without because at the moment I think there's no budget for changes to Rayo. Wink
Previous Topic:Authentication on Tomcat
Next Topic:Multiple SQL operations and commit
Goto Forum:
  


Current Time: Wed Jul 23 14:37:55 EDT 2025

Powered by FUDForum. Page generated in 0.03502 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top