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

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

Introduction

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

Prototype

public void done() 

Source Link

Document

Progress is done.

Usage

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

License:Open Source License

public static void main(String[] args) {

    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setLayout(new GridLayout());
    shell.setSize(300, 100);//from   w  w w .  j  a  v  a2  s . c o m

    new Label(shell, SWT.CENTER).setText("Snippet059VistaProgressIndicator");

    ProgressIndicator indicator = new ProgressIndicator(shell, SWT.HORIZONTAL);

    Color backgroundColor = shell.getDisplay().getSystemColor(SWT.COLOR_CYAN);

    indicator.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
    indicator.setBackground(backgroundColor);
    shell.open();

    performProgressOn(display, indicator);

    indicator.done();
    display.dispose();

}