Example usage for org.eclipse.jface.dialogs ProgressIndicator worked

List of usage examples for org.eclipse.jface.dialogs ProgressIndicator worked

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs ProgressIndicator worked.

Prototype

public void worked(double work) 

Source Link

Document

Moves the progress indicator by the given amount of work units

Usage

From source file:com.bdaum.zoom.ui.internal.views.ExhibitionView.java

License:Open Source License

private PWall addWall(Wall wall, double y, boolean reposition, ProgressIndicator bar) {
    PWall pwall = new PWall(wall);
    surface.addChild(pwall);/*  ww  w  .j  a  v a 2s .c  om*/
    walls.add(pwall);
    pwall.setOffset(0, y);
    int pos = 0;
    List<String> ids = new ArrayList<String>(wall.getExhibit().size());
    IDbManager dbManager = Core.getCore().getDbManager();
    for (String id : wall.getExhibit()) {
        ExhibitImpl exhibit = dbManager.obtainById(ExhibitImpl.class, id);
        if (exhibit != null) {
            ids.add(id);
            exhibits.add(exhibit);
            if (reposition)
                pos += exhibit.getWidth() / 2;
            else
                pos = exhibit.getX();
            makeExhibit(pwall, pos, exhibit);
            pos += exhibit.getWidth();
        }
    }
    wall.setExhibit(ids);
    if (bar != null)
        bar.worked(1);
    setupExhibition(getViewSite(), exhibition, pos);
    setPanAndZoomHandlers();
    return pwall;
}

From source file:com.bdaum.zoom.ui.internal.views.WebGalleryView.java

License:Open Source License

protected PStoryboard addStoryboard(Storyboard storyboard, double y, ProgressIndicator progrBar) {
    IDbManager dbManager = Core.getCore().getDbManager();
    PStoryboard pstoryboard = new PStoryboard(storyboard);
    storyMap.put(storyboard.getStringId(), pstoryboard);
    surface.addChild(pstoryboard);/*from ww  w  . ja  v a2s  . c  o  m*/
    pstoryboard.setOffset(0, y);
    int i = 0;
    List<String> ids = new ArrayList<String>(storyboard.getExhibit().size());
    for (String id : storyboard.getExhibit()) {
        WebExhibitImpl exhibit = dbManager.obtainById(WebExhibitImpl.class, id);
        if (exhibit != null) {
            ids.add(id);
            PWebExhibit pexhibit = makeExhibit(pstoryboard, exhibit);
            pexhibit.setSequenceNo(++i);
            if (progrBar != null)
                progrBar.worked(1);
        }
    }
    storyboard.setExhibit(ids);
    setColor(canvas);
    pstoryboard.updateColors();
    setPanAndZoomHandlers();
    return pstoryboard;
}

From source file:org.eclipse.jface.snippets.dialogs.Snippet059VistaProgressIndicator.java

License:Open Source License

private static void performProgressOn(Display display, ProgressIndicator indicator) {

    indicator.beginTask(200);/*from w  w w.j  av a 2s.c o m*/
    indicator.showNormal();
    indicator.worked(50);
    spin(display);

    indicator.showPaused();
    indicator.worked(50);
    spin(display);

    indicator.showError();
    indicator.worked(50);
    spin(display);
}