Java 类org.eclipse.swt.widgets.ProgressBar 实例源码

项目:lider-ahenk-installer    文件:XmppInstallationStatus.java   
@Override
public void createControl(Composite parent) {
    Composite container = GUIHelper.createComposite(parent, 1);
    setControl(container);

    txtLogConsole = GUIHelper.createText(container, new GridData(GridData.FILL_BOTH),
            SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);

    progressBar = new ProgressBar(container, SWT.SMOOTH | SWT.HORIZONTAL);
    progressBar.setSelection(0);
    progressBar.setMaximum(100);

    GridData progressGd = new GridData(GridData.FILL_HORIZONTAL);
    progressGd.heightHint = 40;
    progressBar.setLayoutData(progressGd);
}
项目:lider-ahenk-installer    文件:DatabaseClusterInstallationStatus.java   
@Override
public void createControl(Composite parent) {
    Composite container = GUIHelper.createComposite(parent, 1);
    setControl(container);

    txtLogConsole = GUIHelper.createText(container, new GridData(GridData.FILL_BOTH),
            SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
    txtLogConsole.setTopIndex(txtLogConsole.getLineCount() - 1);

    progressBar = new ProgressBar(container, SWT.SMOOTH | SWT.INDETERMINATE);
    progressBar.setSelection(0);
    progressBar.setMaximum(100);
    GridData progressGd = new GridData(GridData.FILL_HORIZONTAL);
    progressGd.heightHint = 40;
    // progressGd.widthHint = 780;
    progressBar.setLayoutData(progressGd);
}
项目:lider-ahenk-installer    文件:XmppClusterInstallationStatus.java   
@Override
public void createControl(Composite parent) {
    Composite container = GUIHelper.createComposite(parent, 1);
    setControl(container);

    txtLogConsole = GUIHelper.createText(container, new GridData(GridData.FILL_BOTH),
            SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
    txtLogConsole.setTopIndex(txtLogConsole.getLineCount() - 1);

    progressBar = new ProgressBar(container, SWT.SMOOTH | SWT.INDETERMINATE);
    progressBar.setSelection(0);
    progressBar.setMaximum(100);
    GridData progressGd = new GridData(GridData.FILL_HORIZONTAL);
    progressGd.heightHint = 40;
    // progressGd.widthHint = 780;
    progressBar.setLayoutData(progressGd);

}
项目:lider-ahenk-installer    文件:LiderInstallationStatus.java   
@Override
public void createControl(Composite parent) {
    Composite container = GUIHelper.createComposite(parent, 1);
    setControl(container);

    txtLogConsole = GUIHelper.createText(container, new GridData(GridData.FILL_BOTH),
            SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);

    progressBar = new ProgressBar(container, SWT.SMOOTH | SWT.HORIZONTAL);
    progressBar.setSelection(0);
    progressBar.setMaximum(100);
    GridData progressGd = new GridData(GridData.FILL_HORIZONTAL);
    progressGd.heightHint = 40;
    // progressGd.widthHint = 780;
    progressBar.setLayoutData(progressGd);
}
项目:lider-ahenk-installer    文件:LdapInstallationStatus.java   
@Override
public void createControl(Composite parent) {
    Composite container = GUIHelper.createComposite(parent, 1);
    setControl(container);

    txtLogConsole = GUIHelper.createText(container, new GridData(GridData.FILL_BOTH),
            SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);

    progressBar = new ProgressBar(container, SWT.SMOOTH | SWT.HORIZONTAL);
    progressBar.setSelection(0);
    progressBar.setMaximum(100);
    GridData progressGd = new GridData(GridData.FILL_HORIZONTAL);
    progressGd.heightHint = 40;
    // progressGd.widthHint = 780;
    progressBar.setLayoutData(progressGd);
}
项目:lider-ahenk-installer    文件:DatabaseInstallationStatus.java   
@Override
public void createControl(Composite parent) {
    Composite container = GUIHelper.createComposite(parent, 1);
    setControl(container);

    txtLogConsole = GUIHelper.createText(container, new GridData(GridData.FILL_BOTH),
            SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);

    progressBar = new ProgressBar(container, SWT.SMOOTH | SWT.HORIZONTAL);
    progressBar.setSelection(0);
    progressBar.setMaximum(100);
    GridData progressGd = new GridData(GridData.FILL_HORIZONTAL);
    progressGd.heightHint = 40;
    // progressGd.widthHint = 780;
    progressBar.setLayoutData(progressGd);
}
项目:lider-ahenk-installer    文件:LiderClusterInstallationStatus.java   
@Override
public void createControl(Composite parent) {
    Composite container = GUIHelper.createComposite(parent, 1);
    setControl(container);

    txtLogConsole = GUIHelper.createText(container, new GridData(GridData.FILL_BOTH),
            SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
    txtLogConsole.setTopIndex(txtLogConsole.getLineCount() - 1);

    progressBar = new ProgressBar(container, SWT.SMOOTH | SWT.INDETERMINATE);
    progressBar.setSelection(0);
    progressBar.setMaximum(100);
    GridData progressGd = new GridData(GridData.FILL_HORIZONTAL);
    progressGd.heightHint = 40;
    // progressGd.widthHint = 780;
    progressBar.setLayoutData(progressGd);

}
项目:lider-ahenk-installer    文件:LdapUpdateStatusPage.java   
@Override
public void createControl(Composite parent) {
    Composite container = GUIHelper.createComposite(parent, 1);
    setControl(container);

    txtLogConsole = GUIHelper.createText(container, new GridData(GridData.FILL_BOTH),
            SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);

    progressBar = new ProgressBar(container, SWT.SMOOTH | SWT.HORIZONTAL);
    progressBar.setSelection(0);
    progressBar.setMaximum(100);
    GridData progressGd = new GridData(GridData.FILL_HORIZONTAL);
    progressGd.heightHint = 40;
    // progressGd.widthHint = 780;
    progressBar.setLayoutData(progressGd);
}
项目:lider-ahenk-installer    文件:MigrationStatusPage.java   
@Override
public void createControl(Composite parent) {
    mainContainer = GUIHelper.createComposite(parent, 1);
    setControl(mainContainer);

    txtLogConsole = GUIHelper.createText(mainContainer, new GridData(GridData.FILL_BOTH),
            SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);

    progressBar = new ProgressBar(mainContainer, SWT.SMOOTH | SWT.HORIZONTAL);
    progressBar.setSelection(0);
    progressBar.setMaximum(100);

    GridData progressGd = new GridData(GridData.FILL_HORIZONTAL);
    progressGd.heightHint = 40;
    progressBar.setLayoutData(progressGd);
}
项目:lider-ahenk-installer    文件:AhenkInstallationStatusPage.java   
@Override
public void createControl(Composite parent) {
    mainContainer = GUIHelper.createComposite(parent, 1);
    setControl(mainContainer);

    txtLogConsole = GUIHelper.createText(mainContainer, new GridData(GridData.FILL_BOTH),
            SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);

    progressBar = new ProgressBar(mainContainer, SWT.SMOOTH | SWT.HORIZONTAL);
    progressBar.setSelection(0);
    progressBar.setMaximum(100);

    GridData progressGd = new GridData(GridData.FILL_HORIZONTAL);
    progressGd.heightHint = 40;
    progressBar.setLayoutData(progressGd);
}
项目:AndroidRobot    文件:AndroidRobot.java   
public static void removeOldTestcase() {
    Table table = tableViewerCase.getTable();
    TableItem[] tableItems = table.getItems();
    for (int i = 0; i < tableItems.length; i++) {
        String sn = tableItems[i].getText(0);
        String handset = tableItems[i].getText(1);
        String scripts = tableItems[i].getText(2);
        RowItem rowItem = htRowItem.get(sn + "." + handset + "." + scripts);
        if (rowItem != null) {
            htRowItem.remove(sn + "." + handset + "." + scripts);
            listCase.remove(rowItem);
            ProgressBar bar = htProgress.get(sn + "." + handset + "." + scripts);
            bar.dispose();
            htProgress.remove(sn + "." + handset + "." + scripts);
        }
    }
    tableViewerCase.refresh(false);
}
项目:translationstudio8    文件:LicenseManageDialog.java   
private void createBarComp(Composite parent) {
    Composite barComp = new Composite(parent, SWT.NONE);
    GridLayout barLayout = new GridLayout();
    barLayout.marginTop = 10;
    barComp.setLayout(barLayout);
    barComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    label4 = new Label(barComp, SWT.NONE);
    label4.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    bar = new ProgressBar(barComp, SWT.NONE);
    bar.setMaximum(10);
    bar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    setVisible(false);
}
项目:ControlAndroidDeviceFromPC    文件:WelcomDialog.java   
/**
 * Create contents of the dialog.
 */
private void createContents() {
    shlLoading = new Shell(getParent(), getStyle());
    shlLoading.setSize(274, 157);
    shlLoading.setText("Loading");
    GridLayout gl_shlLoading = new GridLayout(1, false);
    gl_shlLoading.marginWidth = 20;
    gl_shlLoading.marginHeight = 20;
    shlLoading.setLayout(gl_shlLoading);

    ProgressBar progressBar = new ProgressBar(shlLoading, SWT.BORDER | SWT.SMOOTH | SWT.INDETERMINATE);
    GridData gd_progressBar = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
    gd_progressBar.heightHint = 39;
    progressBar.setLayoutData(gd_progressBar);

    Label lblLoading = new Label(shlLoading, SWT.NONE);
    GridData gd_lblLoading = new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1);
    gd_lblLoading.verticalIndent = 10;
    lblLoading.setLayoutData(gd_lblLoading);
    lblLoading.setText("Connecting andorid device...");

    shlLoading.pack();
    SwtUtils.center(shlLoading, 10);
}
项目:STAGE    文件:StageProgressBar.java   
public StageProgressBar( final Composite parent, int style, GridData gridData ) {
    serverPush = new ServerPushSession();

    Composite mainComposite = new Composite(parent, SWT.NONE);
    mainComposite.setLayoutData(gridData);
    mainComposite.setLayout(new GridLayout(2, false));
    this.mainComposite = mainComposite;
    progressLabel = new Label(mainComposite, SWT.NONE);
    progressLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    progressLabel.setText("");

    progressBar = new ProgressBar(mainComposite, style);
    pBarGridData = new GridData(SWT.FILL, SWT.FILL, true, false);
    progressBar.setLayoutData(pBarGridData);

    mainComposite.setVisible(false);
}
项目:tmxeditor8    文件:XLIFFEditorStatusLineItemWithProgressBar.java   
public void fill(Composite parent) {
    super.fill(parent);
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout gl = new GridLayout(2, false);
    gl.marginWidth = 5;
    gl.marginHeight = 3;
    container.setLayout(gl);

    progressBar = new ProgressBar(container, SWT.SMOOTH);
    GridData gdPprogressBar = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);
    gdPprogressBar.heightHint = 16;
    gdPprogressBar.widthHint = 130;
    progressBar.setLayoutData(gdPprogressBar);
    progressBar.setMinimum(0); // 最小值
    progressBar.setMaximum(100);// 最大值
    progressBar.setSelection(progressValue);
    progressBar.setToolTipText(defaultMessage);

    label = new Label(container, SWT.None);
    label.setText(progressValue + "%");

    StatusLineLayoutData data = new StatusLineLayoutData();
    container.setLayoutData(data);
}
项目:tmxeditor8    文件:LicenseManageDialog.java   
private void createBarComp(Composite parent) {
    Composite barComp = new Composite(parent, SWT.NONE);
    GridLayout barLayout = new GridLayout();
    barLayout.marginTop = 10;
    barComp.setLayout(barLayout);
    barComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    label4 = new Label(barComp, SWT.NONE);
    label4.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    bar = new ProgressBar(barComp, SWT.NONE);
    bar.setMaximum(10);
    bar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    setVisible(false);
}
项目:Archie-Smart-IDE    文件:ProgressUpdater.java   
/*******************************************************
 * Creates a {@link ProgressUpdater} to encapsulate the updating of
 * graph view progress bar and progress label, doing this operation on the
 * UI thread.
 * 
 * @param progBar
 *            The graph view's progress bar
 * @param label
 *            The graph view's progress label
 *******************************************************/
public ProgressUpdater(final ProgressBar progBar, final Label label)
{
    if (progBar == null || label == null)
    {
        throw new IllegalArgumentException();
    }

    mProgressBar = progBar;
    mProgressLabel = label;
    mDisplay = mProgressBar.getDisplay();

    mVisible = false;
    mProgressValue = 0;
    mProgressText = "";
}
项目:convertigo-eclipse    文件:SchemaObjectsDialogComposite.java   
protected void initialize() {
    Label label0 = new Label (this, SWT.NONE);
    label0.setText ("Please choose an element to import into a sequence's step:");

    GridData data = new GridData ();
    data.horizontalAlignment = GridData.FILL;
    data.verticalAlignment = GridData.FILL;
    data.grabExcessHorizontalSpace = true;
    data.grabExcessVerticalSpace = true;
    data.heightHint = 200;
    list = new List(this, SWT.BORDER | SWT.V_SCROLL);
    list.setLayoutData (data);

       GridData gridData2 = new GridData();
    gridData2.horizontalSpan = 2;
    gridData2.verticalAlignment = GridData.CENTER;
    gridData2.horizontalAlignment = GridData.FILL;
    labelProgression = new Label(this, SWT.NONE);
    labelProgression.setText("Progression");
    labelProgression.setLayoutData(gridData2);

       GridData gridData4 = new GridData();
    gridData4.horizontalSpan = 2;
    gridData4.verticalAlignment = GridData.CENTER;
    gridData4.horizontalAlignment = GridData.FILL;
       progressBar = new ProgressBar(this, SWT.NONE);
       //progressBar.setBounds(new Rectangle(16, 349, 571, 17));
       progressBar.setLayoutData(gridData4);

    GridLayout gridLayout = new GridLayout();
    setLayout(gridLayout);
    setSize(new Point(408, 251));
}
项目:convertigo-eclipse    文件:XmlStructureDialogComposite.java   
protected void initialize() {
    Label label0 = new Label (this, SWT.NONE);
    label0.setText ("Please enter the XML structure to import into a sequence's step:");

    GridData data = new GridData ();
    data.horizontalAlignment = GridData.FILL;
    data.verticalAlignment = GridData.FILL;
    data.grabExcessHorizontalSpace = true;
    data.grabExcessVerticalSpace = true;
    data.heightHint = 200;
    xml = new Text(this, SWT.BORDER | SWT.V_SCROLL);
    xml.setLayoutData (data);

       GridData gridData2 = new GridData();
    gridData2.horizontalSpan = 2;
    gridData2.verticalAlignment = GridData.CENTER;
    gridData2.horizontalAlignment = GridData.FILL;
    labelProgression = new Label(this, SWT.NONE);
    labelProgression.setText("Progression");
    labelProgression.setLayoutData(gridData2);

       GridData gridData4 = new GridData();
    gridData4.horizontalSpan = 2;
    gridData4.verticalAlignment = GridData.CENTER;
    gridData4.horizontalAlignment = GridData.FILL;
       progressBar = new ProgressBar(this, SWT.NONE);
       //progressBar.setBounds(new Rectangle(16, 349, 571, 17));
       progressBar.setLayoutData(gridData4);

    GridLayout gridLayout = new GridLayout();
    setLayout(gridLayout);
    setSize(new Point(408, 251));
}
项目:SWET    文件:AsyncExecEx.java   
public LongRunningOperation(Display display, ProgressBar progressBar,
        Button button) {
    this.display = display;
    this.progressBar = progressBar;
    this.parentShell = progressBar.getShell();
    this.button = button;
}
项目:BiglyBT    文件:AZProgressBar.java   
/**
 *
 * @param parent
 * @param isIndeterminate
 * @param useInputButton determines whether the <code>inputButton</code> is available or not
 * @param image an <code>Image</code> to display; may be null
 */
public AZProgressBar(Composite parent, boolean isIndeterminate) {
    super(parent, SWT.NULL);

    incrementalProgressBar = new ProgressBar(this, SWT.HORIZONTAL);
    indeterminateProgressBar = new ProgressBar(this, SWT.HORIZONTAL
            | SWT.INDETERMINATE);

    stack = new StackLayout();
    setLayout(stack);
    pack();

    setIndeterminate(isIndeterminate);
}
项目:RefDiff    文件:ProgressBarDialog.java   
private Control createDialogArea(Composite shell) {
       GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    shell.setLayout(layout);

    lblStep = new Label(shell, SWT.NONE);
    lblStep.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
    lblStep.setText("Step 1 / 999");

    lblMessage = new Label(shell, SWT.NONE);
    lblMessage.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
    lblMessage.setText("Idle");

    pbProg = new ProgressBar(shell, SWT.SMOOTH | SWT.INDETERMINATE);
    pbProg.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
    pbProg.setMaximum(1000);
    pbProg.setSelection(0);
    pbProg.setSelection(256);

    final Label lblSeparator = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
    lblSeparator.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

    txtLog = new Text(shell, SWT.MULTI
              | SWT.BORDER
              | SWT.H_SCROLL
              | SWT.V_SCROLL);
    txtLog.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    txtLog.setEditable(false);
    txtLog.setBackground(new Color(shell.getDisplay(), 10,10,10));
    txtLog.setForeground(new Color(shell.getDisplay(), 200,200,200));

    shell.layout();

    return shell;
}
项目:termsuite-ui    文件:ProgressInfoItem.java   
/**
 * Create the progress bar and apply any style bits from style.
 *
 * @param style
 */
void createProgressBar(int style) {

    FormData buttonData = new FormData();
    buttonData.top = new FormAttachment(progressLabel, 0);
    buttonData.right = new FormAttachment(100,
            IDialogConstants.HORIZONTAL_SPACING * -1);

    actionBar.setLayoutData(buttonData);

    progressBar = new ProgressBar(this, SWT.HORIZONTAL | style);
    FormData barData = new FormData();
    barData.top = new FormAttachment(actionBar,
            IDialogConstants.VERTICAL_SPACING, SWT.TOP);
    barData.left = new FormAttachment(progressLabel, 0, SWT.LEFT);
    barData.right = new FormAttachment(actionBar,
            IDialogConstants.HORIZONTAL_SPACING * -1);
    barData.height = MAX_PROGRESS_HEIGHT;
    barData.width = 0;// default is too large
    progressBar.setLayoutData(barData);

    if (taskEntries.size() > 0) {
        // Reattach the link label if there is one
        FormData linkData = new FormData();
        linkData.top = new FormAttachment(progressBar,
                IDialogConstants.VERTICAL_SPACING);
        linkData.left = new FormAttachment(progressBar, 0, SWT.LEFT);
        linkData.right = new FormAttachment(progressBar, 0, SWT.RIGHT);
        // Give an initial value so as to constrain the link shortening
        linkData.width = 20;

        taskEntries.get(0).setLayoutData(linkData);
    }
}
项目:Black    文件:showProgress.java   
/**
 * Create contents of the dialog.
 */
private void createContents() {
    shell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
    shell.setSize(450, 146);
    windowLocation.dialogLocation(getParent(), shell);
    progressBar = new ProgressBar(shell, SWT.NONE);
    progressBar.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
    progressBar.setBounds(10, 10, 424, 17);
    progressBar.setMaximum(100);

    label = new Label(shell, SWT.NONE);
    label.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
    label.setAlignment(SWT.CENTER);
    label.setBounds(10, 33, 424, 43);

    Button btnNewButton = new Button(shell, SWT.NONE);
    btnNewButton.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {

            actionWhenOKButtonSelected();
            b.ba.progressMessage = "";
            b.ba.progressValue = 0;
            if(b.ba.progressBugStop){
                b.ba.progressBugStop = false;
            }
            doing.stop();
            dispose();
        }
    });
    btnNewButton.setBounds(359, 82, 75, 25);
    btnNewButton.setText("\u786E\u5B9A");

}
项目:TranskribusSwtGui    文件:ProgressBarComposite.java   
protected void createContents() {
    this.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
    this.setLayout(new GridLayout());       
    Composite composite = this;

    taskNameLabel = new CLabel(composite, SWT.NONE);
    taskNameLabel.setImage(processImage);
    taskNameLabel.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
    taskNameLabel.setText(taskName);

    subTaskLabel = new CLabel(composite, SWT.NONE);
    subTaskLabel.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
    subTaskLabel.setText("");

    progressBarComposite = new Composite(this, SWT.NONE);
    progressBarComposite.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
    progressBarComposite.setLayout(new FillLayout());

    progressBar = new ProgressBar(progressBarComposite, progressBarStyle);
    progressBar.setMaximum(0);

    detailLabel = new CLabel(this, SWT.NONE);
    detailLabel.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));

    cancelComposite = new Composite(this, SWT.NONE);
    cancelComposite.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
    final GridLayout gridLayout_1 = new GridLayout();
    gridLayout_1.numColumns = 2;
    cancelComposite.setLayout(gridLayout_1);

    cancelButton = new Button(cancelComposite, SWT.NONE);

    cancelButton.setLayoutData(new GridData(78, SWT.DEFAULT));
    cancelButton.setText("Cancel");
}
项目:ether    文件:Splash.java   
public Splash(Display display, Rectangle displayRect, boolean showProgress)  {
    image = new Image(display, getClass().getResourceAsStream("/splash.png"));
    shell = new Shell(SWT.ON_TOP);
    progressUI    = new ProgressBar(shell, SWT.NONE);
    progressUI.setMaximum(100);

    Label label = new Label(shell, SWT.NONE);
    label.setImage(image);

    FormLayout layout = new FormLayout();
    shell.setLayout(layout);

    FormData labelData = new FormData();
    labelData.right = new FormAttachment(100, 0);
    labelData.bottom = new FormAttachment(100, 0);
    label.setLayoutData(labelData);

    FormData progressData = new FormData();
    progressData.left = new FormAttachment(0, -5);
    progressData.right = new FormAttachment(100, 0);
    progressData.bottom = new FormAttachment(100, 0);
    progressUI.setLayoutData(progressData);
    progressUI.setVisible(showProgress);
    shell.pack();

    Rectangle splashRect = shell.getBounds();

    progressUI.setBounds(2, splashRect.height-14, splashRect.width-6, 10);

    int x = displayRect.x + (displayRect.width - splashRect.width) / 2;
    int y = displayRect.y + (displayRect.height - splashRect.height) / 2;
    shell.setLocation(x, y);

    shell.open();       
    setProgress(0);
}
项目:ether    文件:Splash.java   
public Splash(Display display, Rectangle displayRect, boolean showProgress)  {
    image = new Image(display, getClass().getResourceAsStream("/splash.png"));
    shell = new Shell(SWT.ON_TOP);
    progressUI    = new ProgressBar(shell, SWT.NONE);
    progressUI.setMaximum(100);

    Label label = new Label(shell, SWT.NONE);
    label.setImage(image);

    FormLayout layout = new FormLayout();
    shell.setLayout(layout);

    FormData labelData = new FormData();
    labelData.right = new FormAttachment(100, 0);
    labelData.bottom = new FormAttachment(100, 0);
    label.setLayoutData(labelData);

    FormData progressData = new FormData();
    progressData.left = new FormAttachment(0, -5);
    progressData.right = new FormAttachment(100, 0);
    progressData.bottom = new FormAttachment(100, 0);
    progressUI.setLayoutData(progressData);
    progressUI.setVisible(showProgress);
    shell.pack();

    Rectangle splashRect = shell.getBounds();

    progressUI.setBounds(2, splashRect.height-14, splashRect.width-6, 10);

    int x = displayRect.x + (displayRect.width - splashRect.width) / 2;
    int y = displayRect.y + (displayRect.height - splashRect.height) / 2;
    shell.setLocation(x, y);

    shell.open();       
    setProgress(0);
}
项目:bts    文件:FinishInstallationPage.java   
/**
 * Create contents of the wizard.
 * @param parent
 */
public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NULL);
    container.setLayout(new GridLayout(2, false));

    Label lblNewLabel = new Label(container, SWT.NONE);
    lblNewLabel.setText("Installation Progress");

    progressBar = new ProgressBar(container, SWT.SMOOTH);
    progressBar.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    setControl(container);
    new Label(container, SWT.NONE);
    new Label(container, SWT.NONE);

    Label lblNewLabel_1 = new Label(container, SWT.NONE);
    lblNewLabel_1.setText("Currently:");

    jobLabel = new Label(container, SWT.NONE);
    jobLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    jobLabel.setText("Installation...");
    new Label(container, SWT.NONE);
    new Label(container, SWT.NONE);

    Label lblStepsYouHave = new Label(container, SWT.NONE);
    lblStepsYouHave.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 2, 1));
    lblStepsYouHave.setFont(SWTResourceManager.getFont("Segoe UI", 9, SWT.BOLD));
    lblStepsYouHave.setText("Steps you have to allow (On Windows)");

    Label lblNewLabel_2 = new Label(container, SWT.NONE);
    lblNewLabel_2.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
    lblNewLabel_2.setText("1. You will be asked if Install.exe should be excecuted: Please allow the execution of Install.exe.");

    Label lblNewLabel_3 = new Label(container, SWT.NONE);
    lblNewLabel_3.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
    lblNewLabel_3.setText("2. Next you might be asked if the installation of the software was successful: Please click YES.");
}
项目:org.code.quickGeneratingForSSM    文件:PbDialog.java   
/**
 * Create contents of the dialog.
 */
private void createContents() {
    shell = new Shell(getParent(), getStyle());
    shell.setSize(445, 135);
    shell.setText("\u8BF7\u7B49\u5F85");

    progressBar = new ProgressBar(shell, SWT.HORIZONTAL|SWT.SMOOTH|SWT.INDETERMINATE);
    progressBar.setBounds(40, 29, 364, 32);

}
项目:Ref-Finder    文件:ProgressBarDialog.java   
private Control createDialogArea(Composite shell)
{
  GridLayout layout = new GridLayout();
  layout.numColumns = 1;
  shell.setLayout(layout);

  this.lblStep = new Label(shell, 0);
  this.lblStep.setLayoutData(new GridData(4, 2, true, false));
  this.lblStep.setText("Step 1 / 999");

  this.lblMessage = new Label(shell, 0);
  this.lblMessage.setLayoutData(new GridData(4, 2, true, false));
  this.lblMessage.setText("Idle");

  this.pbProg = new ProgressBar(shell, 65538);
  this.pbProg.setLayoutData(new GridData(4, 2, true, false));
  this.pbProg.setMaximum(1000);
  this.pbProg.setSelection(0);
  this.pbProg.setSelection(256);

  Label lblSeparator = new Label(shell, 258);
  lblSeparator.setLayoutData(new GridData(4, 2, true, false));

  this.txtLog = new Text(shell, 2818);

  this.txtLog.setLayoutData(new GridData(4, 4, true, true));
  this.txtLog.setEditable(false);
  this.txtLog.setBackground(new Color(shell.getDisplay(), 10, 10, 10));
  this.txtLog.setForeground(new Color(shell.getDisplay(), 200, 200, 200));

  shell.layout();

  return shell;
}
项目:Ref-Finder    文件:ProgressBarDialog.java   
private Control createDialogArea(Composite shell) {
       GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    shell.setLayout(layout);

    lblStep = new Label(shell, SWT.NONE);
    lblStep.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
    lblStep.setText("Step 1 / 999");

    lblMessage = new Label(shell, SWT.NONE);
    lblMessage.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
    lblMessage.setText("Idle");

    pbProg = new ProgressBar(shell, SWT.SMOOTH | SWT.INDETERMINATE);
    pbProg.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
    pbProg.setMaximum(1000);
    pbProg.setSelection(0);
    pbProg.setSelection(256);

    final Label lblSeparator = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
    lblSeparator.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

    txtLog = new Text(shell, SWT.MULTI
              | SWT.BORDER
              | SWT.H_SCROLL
              | SWT.V_SCROLL);
    txtLog.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    txtLog.setEditable(false);
    txtLog.setBackground(new Color(shell.getDisplay(), 10,10,10));
    txtLog.setForeground(new Color(shell.getDisplay(), 200,200,200));

    shell.layout();

    return shell;
}
项目:Ref-Finder    文件:ProgressBarDialog.java   
private Control createDialogArea(Composite shell)
{
  GridLayout layout = new GridLayout();
  layout.numColumns = 1;
  shell.setLayout(layout);

  this.lblStep = new Label(shell, 0);
  this.lblStep.setLayoutData(new GridData(4, 2, true, false));
  this.lblStep.setText("Step 1 / 999");

  this.lblMessage = new Label(shell, 0);
  this.lblMessage.setLayoutData(new GridData(4, 2, true, false));
  this.lblMessage.setText("Idle");

  this.pbProg = new ProgressBar(shell, 65538);
  this.pbProg.setLayoutData(new GridData(4, 2, true, false));
  this.pbProg.setMaximum(1000);
  this.pbProg.setSelection(0);
  this.pbProg.setSelection(256);

  Label lblSeparator = new Label(shell, 258);
  lblSeparator.setLayoutData(new GridData(4, 2, true, false));

  this.txtLog = new Text(shell, 2818);

  this.txtLog.setLayoutData(new GridData(4, 4, true, true));
  this.txtLog.setEditable(false);
  this.txtLog.setBackground(new Color(shell.getDisplay(), 10, 10, 10));
  this.txtLog.setForeground(new Color(shell.getDisplay(), 200, 200, 200));

  shell.layout();

  return shell;
}
项目:scouter    文件:ProgressBarWindow.java   
public ProgressBarWindow(Shell shell, String title){
       m_shell = new Shell(shell, SWT.TITLE);
       m_shell.setText(title);
       m_shell.setLayout(new FillLayout());
       int [] pos = UIUtil.getScreenSize();
       m_shell.setBounds((pos[0]/2)-75, (pos[1]/2)-15, 150, 40);

       m_progressBar = new ProgressBar(m_shell, SWT.HORIZONTAL);
    m_progressBar.setMinimum(0);
    m_progressBar.setMaximum(100);
    m_progressBar.setBounds(0, 0, 140, 20);

    m_progressBar.setState(SWT.ERROR);
       m_shell.open();
}
项目:AndroidRobot    文件:AndroidRobot.java   
private static void addProgressBar(int index, String key, int count) {
    Table table = tableViewerCase.getTable();
    TableItem ti = table.getItem(index);
    ProgressBar bar = new ProgressBar(table, SWT.HORIZONTAL | SWT.SMOOTH);
    bar.setSelection(0);
    bar.setMinimum(0);
    bar.setMaximum(count);
    TableEditor tabEditor = new TableEditor(table);
    tabEditor.grabHorizontal = editor.grabVertical = true;
    tabEditor.setEditor(bar, ti, 3);

    htProgress.put(key, bar);
}
项目:AndroidRobot    文件:AndroidRobot.java   
public static void delTestCase() {
    listCase.clear();
    tableViewerCase.refresh(false);

    //remove
    for (Iterator itrProgress = htProgress.keySet().iterator(); itrProgress.hasNext();) {
        String taskName = (String) itrProgress.next();
        ProgressBar progressBar = htProgress.get(taskName);
        progressBar.dispose();
    }

    htProgress.clear();
}
项目:AndroidRobot    文件:AndroidRobot.java   
public static void setProgressBarCount(String sn, String taskName, String scriptName) {
    String key = sn + "." + taskName + "." + scriptName;
    if (htProgress.containsKey(key)) {
        ProgressBar bar = htProgress.get(key);
        int max = bar.getMaximum();

        //cycle
        if (max == bar.getSelection()) {
            bar.setSelection(0);
        }
        bar.setSelection(bar.getSelection() + 1);
    }
}
项目:AndroidRobot    文件:AndroidRobot.java   
public static void setProgressBarCount(String sn, String taskName, String scriptName, int num) {
    String key = sn + "." + taskName + "." + scriptName;
    if (htProgress.containsKey(key)) {
        ProgressBar bar = htProgress.get(key);
        int max = bar.getMaximum();

        //cycle
        if (max == bar.getSelection()) {
            bar.setSelection(0);
        }
        bar.setSelection(num);
    }
}
项目:AndroidRobot    文件:AndroidRobot.java   
public static void setProgressBarMax(String sn, String taskName, String scriptName) {
    String key = sn + "." + taskName + "." + scriptName;
    if (htProgress.containsKey(key)) {
        ProgressBar bar = htProgress.get(key);
        int max = htProgress.get(key).getMaximum();
        bar.setSelection(max);
    }
}
项目:mappwidget    文件:MainView.java   
private void setValue(Composite top, final ProgressBar progressBar, final int value)
{
    top.getDisplay().asyncExec(new Runnable()
    {
        @Override
        public void run()
        {
            progressBar.setSelection(value);
        }
    });
}
项目:mappwidget    文件:MainView.java   
private void setCompliete(Composite top, final Button runButton, final ProgressBar progressBar)
{
    top.getDisplay().asyncExec(new Runnable()
    {
        @Override
        public void run()
        {
            runButton.setEnabled(true);
        }
    });
}