java类org.eclipse.swt.widgets.ProgressBar的实例源码

XmppInstallationStatus.java 文件源码 项目:lider-ahenk-installer 阅读 30 收藏 0 点赞 0 评论 0
@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);
}
DatabaseClusterInstallationStatus.java 文件源码 项目:lider-ahenk-installer 阅读 33 收藏 0 点赞 0 评论 0
@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);
}
XmppClusterInstallationStatus.java 文件源码 项目:lider-ahenk-installer 阅读 23 收藏 0 点赞 0 评论 0
@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);

}
LiderInstallationStatus.java 文件源码 项目:lider-ahenk-installer 阅读 31 收藏 0 点赞 0 评论 0
@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);
}
LdapInstallationStatus.java 文件源码 项目:lider-ahenk-installer 阅读 26 收藏 0 点赞 0 评论 0
@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);
}
DatabaseInstallationStatus.java 文件源码 项目:lider-ahenk-installer 阅读 20 收藏 0 点赞 0 评论 0
@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);
}
LiderClusterInstallationStatus.java 文件源码 项目:lider-ahenk-installer 阅读 28 收藏 0 点赞 0 评论 0
@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);

}
LdapUpdateStatusPage.java 文件源码 项目:lider-ahenk-installer 阅读 32 收藏 0 点赞 0 评论 0
@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);
}
MigrationStatusPage.java 文件源码 项目:lider-ahenk-installer 阅读 26 收藏 0 点赞 0 评论 0
@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);
}
AhenkInstallationStatusPage.java 文件源码 项目:lider-ahenk-installer 阅读 29 收藏 0 点赞 0 评论 0
@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.java 文件源码 项目:AndroidRobot 阅读 26 收藏 0 点赞 0 评论 0
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);
}
LicenseManageDialog.java 文件源码 项目:translationstudio8 阅读 23 收藏 0 点赞 0 评论 0
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);
}
WelcomDialog.java 文件源码 项目:ControlAndroidDeviceFromPC 阅读 23 收藏 0 点赞 0 评论 0
/**
 * 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);
}
StageProgressBar.java 文件源码 项目:STAGE 阅读 31 收藏 0 点赞 0 评论 0
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);
}
XLIFFEditorStatusLineItemWithProgressBar.java 文件源码 项目:tmxeditor8 阅读 30 收藏 0 点赞 0 评论 0
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);
}
LicenseManageDialog.java 文件源码 项目:tmxeditor8 阅读 27 收藏 0 点赞 0 评论 0
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);
}
ProgressUpdater.java 文件源码 项目:Archie-Smart-IDE 阅读 24 收藏 0 点赞 0 评论 0
/*******************************************************
 * 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 = "";
}
SchemaObjectsDialogComposite.java 文件源码 项目:convertigo-eclipse 阅读 29 收藏 0 点赞 0 评论 0
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));
}
XmlStructureDialogComposite.java 文件源码 项目:convertigo-eclipse 阅读 26 收藏 0 点赞 0 评论 0
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));
}
AsyncExecEx.java 文件源码 项目:SWET 阅读 35 收藏 0 点赞 0 评论 0
public LongRunningOperation(Display display, ProgressBar progressBar,
        Button button) {
    this.display = display;
    this.progressBar = progressBar;
    this.parentShell = progressBar.getShell();
    this.button = button;
}
AZProgressBar.java 文件源码 项目:BiglyBT 阅读 37 收藏 0 点赞 0 评论 0
/**
 *
 * @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);
}
ProgressBarDialog.java 文件源码 项目:RefDiff 阅读 37 收藏 0 点赞 0 评论 0
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;
}
ProgressInfoItem.java 文件源码 项目:termsuite-ui 阅读 23 收藏 0 点赞 0 评论 0
/**
 * 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);
    }
}
showProgress.java 文件源码 项目:Black 阅读 38 收藏 0 点赞 0 评论 0
/**
 * 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");

}
ProgressBarComposite.java 文件源码 项目:TranskribusSwtGui 阅读 27 收藏 0 点赞 0 评论 0
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");
}
Splash.java 文件源码 项目:ether 阅读 46 收藏 0 点赞 0 评论 0
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);
}
Splash.java 文件源码 项目:ether 阅读 36 收藏 0 点赞 0 评论 0
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);
}
FinishInstallationPage.java 文件源码 项目:bts 阅读 24 收藏 0 点赞 0 评论 0
/**
 * 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.");
}
PbDialog.java 文件源码 项目:org.code.quickGeneratingForSSM 阅读 27 收藏 0 点赞 0 评论 0
/**
 * 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);

}
ProgressBarDialog.java 文件源码 项目:Ref-Finder 阅读 45 收藏 0 点赞 0 评论 0
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;
}


问题


面经


文章

微信
公众号

扫码关注公众号