Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Progress Monitor
Progress Monitor [message #816266] Thu, 08 March 2012 16:20 Go to next message
Alex Schroeder is currently offline Alex SchroederFriend
Messages: 38
Registered: February 2010
Location: Zürich, Switzerland
Member

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 Go to previous messageGo to next message
Alex Schroeder is currently offline Alex SchroederFriend
Messages: 38
Registered: February 2010
Location: Zürich, Switzerland
Member

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 13:03 Go to previous messageGo to next message
Ivan Motsch is currently offline Ivan MotschFriend
Messages: 154
Registered: March 2010
Senior Member
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 14:03 Go to previous message
Alex Schroeder is currently offline Alex SchroederFriend
Messages: 38
Registered: February 2010
Location: Zürich, Switzerland
Member

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: Thu Apr 18 12:22:12 GMT 2024

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

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

Back to the top