Example usage for org.eclipse.jface.dialogs IDialogConstants FINISH_LABEL

List of usage examples for org.eclipse.jface.dialogs IDialogConstants FINISH_LABEL

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs IDialogConstants FINISH_LABEL.

Prototype

String FINISH_LABEL

To view the source code for org.eclipse.jface.dialogs IDialogConstants FINISH_LABEL.

Click Source Link

Document

The label for finish buttons.

Usage

From source file:org.eclipse.ui.tests.datatransfer.SmartImportTests.java

License:Open Source License

/**
 * @param dialog//from   www . j  a v a  2  s. c o m
 */
private Button getFinishButton(Control control) {
    if (control instanceof Button && ((Button) control).getText().equals(IDialogConstants.FINISH_LABEL)) {
        return (Button) control;
    } else if (control instanceof Composite) {
        Button res = null;
        for (Control child : ((Composite) control).getChildren()) {
            res = getFinishButton(child);
            if (res != null) {
                return res;
            }
        }
    }
    return null;
}

From source file:org.kalypso.contribs.eclipse.jface.wizard.view.WizardView.java

License:Open Source License

protected void createButtonsForButtonBar(final Composite parent) {
    // Reset button; will be invisible if current page is not resetable (see IResetableWizard).
    createButton(parent, RESET_ID,/*from www .jav a  2  s.com*/
            Messages.getString("org.kalypso.contribs.eclipse.jface.wizard.view.WizardView1"), "doReset", false); //$NON-NLS-1$ //$NON-NLS-2$

    if (m_wizard instanceof IWizard2 && ((IWizard2) m_wizard).hasSaveButton())
        createButton(parent, SAVE_ID,
                Messages.getString("org.kalypso.contribs.eclipse.jface.wizard.view.WizardView2"), "doSave", //$NON-NLS-1$//$NON-NLS-2$
                false);

    if (m_wizard.isHelpAvailable())
        createButton(parent, IDialogConstants.HELP_ID, IDialogConstants.HELP_LABEL, "doHelp", false); //$NON-NLS-1$

    if (m_wizard.needsPreviousAndNextButtons())
        createPreviousAndNextButtons(parent);

    createButton(parent, IDialogConstants.FINISH_ID, IDialogConstants.FINISH_LABEL, "doFinish", //$NON-NLS-1$
            !m_wizard.needsPreviousAndNextButtons());

    if (!(m_wizard instanceof IWizard2) || ((IWizard2) m_wizard).hasCancelButton())
        createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, "doCancel", false); //$NON-NLS-1$
}

From source file:org.kalypso.kalypsomodel1d2d.sim.RMA10CalculationWizard.java

License:Open Source License

private IStatus runCalculation() {
    m_calcPage.runCalculation();//from  w ww.j a  v a 2 s  . c om

    /* Jump to next page and set simulation status to result page */
    try {
        final FileObject resultDirSWAN = m_calcPage.getResultDirSWAN();
        final FileObject resultDirRMA = m_calcPage.getResultDirRMA();
        m_resultPage = new RMA10ResultPage("resultPage", resultDirRMA, resultDirSWAN, m_geoLog, m_unitFolder, //$NON-NLS-1$
                m_caseDataProvider, this);
    } catch (final CoreException e) {
        return e.getStatus();
    }
    final IStatus simulationStatus = m_calcPage.getSimulationStatus();

    addPage(m_resultPage);
    getContainer().updateButtons();

    // get status
    if (simulationStatus.matches(IStatus.ERROR)) {
        // HACK: disable cancel, after result processing, as canceling will not change anything from now on
        final IWizardContainer container = getContainer();
        if (container instanceof WizardDialog2) {
            final Button cancelButton = ((WizardDialog2) container).getButton(IDialogConstants.CANCEL_ID);
            cancelButton.setEnabled(false);
            final Button nextButton = ((WizardDialog2) container).getButton(IDialogConstants.NEXT_ID);
            nextButton.setEnabled(false);
        }

        setFinishText(IDialogConstants.FINISH_LABEL);

        return simulationStatus;
    }

    /* If result processing starts immediately, show that page */
    if (m_calcPage.getStartResultProcessing())
        getContainer().showPage(m_resultPage);

    return simulationStatus;
}

From source file:org.kalypso.kalypsomodel1d2d.sim.RMA10CalculationWizard.java

License:Open Source License

private boolean runResultProcessing() {
    m_resultPage.runResultProcessing();//w ww.ja v  a  2  s . com

    setFinishText(IDialogConstants.FINISH_LABEL);

    /* Jump to next page and set simulation status to result page */
    final IStatus resultStatus = m_resultPage.getResultStatus();

    /* If canceled, cancel the whole dialog at once. */
    return resultStatus.matches(IStatus.CANCEL);
}

From source file:org.kalypso.model.wspm.ui.profil.wizard.importProfile.ImportPrfWizardPage.java

License:Open Source License

protected ImportPrfWizardPage(final String pageName) {
    super(pageName);

    setTitle(Messages.getString("ImportPrfWizardPage_0")); //$NON-NLS-1$
    setDescription(String.format(Messages.getString("ImportPrfWizardPage_1"), IDialogConstants.FINISH_LABEL)); //$NON-NLS-1$
}

From source file:org.modelio.api.ui.ModelioWizardDialog.java

License:Apache License

/**
 * Creates the buttons for this dialog's button bar.
 * <p>// www.  j ava 2  s .  com
 * The <code>WizardDialog</code> implementation of this framework method
 * prevents the parent composite's columns from being made equal width in
 * order to remove the margin between the Back and Next buttons.
 * </p>
 * @param parent the parent composite to contain the buttons
 */
@objid("bc1a8716-120f-11e2-b5c6-002564c97630")
@Override
protected void createButtonsForButtonBar(final Composite parent) {
    ((GridLayout) parent.getLayout()).makeColumnsEqualWidth = false;
    if (this.wizard.isHelpAvailable()) {
        this.helpButton = createButton(parent, IDialogConstants.HELP_ID, IDialogConstants.HELP_LABEL, false);
    }
    if (this.wizard.needsPreviousAndNextButtons()) {
        createPreviousAndNextButtons(parent);
    }
    this.finishButton = createButton(parent, IDialogConstants.FINISH_ID, IDialogConstants.FINISH_LABEL, true);
    this.cancelButton = createCancelButton(parent);

    if (parent.getDisplay().getDismissalAlignment() == SWT.RIGHT) {
        // Make the default button the right-most button.
        // See also special code in org.eclipse.jface.dialogs.Dialog#initializeBounds()
        this.finishButton.moveBelow(null);
    }
}

From source file:org.talend.designer.components.exchange.ui.dialog.ImportExchangeDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.FINISH_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:org.talend.designer.core.ui.editor.properties.controllers.uidialog.tns.TnsEditorDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.FINISH_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);

}

From source file:org.talend.registration.wizards.register.RegisterWizardPage3.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.FINISH_ID, IDialogConstants.FINISH_LABEL, true);
}