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

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

Introduction

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

Prototype

int NEXT_ID

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

Click Source Link

Document

Button id for a "Next" button (value 15).

Usage

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

License:Open Source License

@Override
protected void buttonPressed(int buttonId) {
    if (IDialogConstants.NEXT_ID == buttonId) {
        boolean updateOrCreateSuccess = false;
        boolean success = false;
        try {/*from w w  w.j  a  va  2s  .  c  om*/
            if (alreadyRegistered) {
                success = RegisterManagement.getInstance().updateUser(email, pseudonym, oldPasswd, null,
                        firstname, lastname, country, isProxyEnable, proxyHost, proxyPort);
            } else {
                success = RegisterManagement.getInstance().createUser(email, pseudonym, password, firstname,
                        lastname, country, isProxyEnable, proxyHost, proxyPort, null, null);
            }
            if (success) {
                updateOrCreateSuccess = true;
            }
        } catch (BusinessException e) {
            MessageBoxExceptionHandler.process(e);
            updateOrCreateSuccess = false;
        } finally {
            if (updateOrCreateSuccess) {
                close();
                RegisterWizard registerWizard = new RegisterWizard();
                RegisterWizardPage3 dialog = new RegisterWizardPage3(this.getShell(), registerWizard, email);
                dialog.open();
            }
        }

    } else if (IDialogConstants.BACK_ID == buttonId) {
        close();
        RegisterWizard registerWizard = new RegisterWizard();
        RegisterWizardPage1 dialog = new RegisterWizardPage1(this.getShell(), registerWizard, email, country);
        dialog.open();
    }
}

From source file:org.talend.repository.ui.wizards.newproject.ImportProjectWizardDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    super.createButtonsForButtonBar(parent);

    IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault()
            .getService(IBrandingService.class);

    Button nextButton = getButton(IDialogConstants.NEXT_ID);
    if (nextButton != null) {
        nextButton.setText(Messages.getString("ImportProjectsAction.actionTitle")); //$NON-NLS-1$
        nextButton.setToolTipText(Messages.getString("ImportProjectsAction.actionTooltip", //$NON-NLS-1$
                brandingService.getShortProductName()));
        Point point = nextButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
        GridData data = new GridData(point.x, point.y);
        nextButton.setLayoutData(data);/*  w  w w  .ja  va2s  .  c o  m*/
    }

    Button backButton = getButton(IDialogConstants.BACK_ID);
    if (backButton != null) {
        backButton.setText(Messages.getString("ImportProjectAsAction.actionTitle")); //$NON-NLS-1$
        backButton.setToolTipText(Messages.getString("ImportProjectAsAction.actionTooltip", //$NON-NLS-1$
                brandingService.getShortProductName()));
        Point point = backButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
        GridData data = new GridData(point.x, point.y);
        backButton.setLayoutData(data);
    }

    parent.redraw();
}

From source file:org.universaal.tools.packaging.tool.api.WizardDialogMod.java

License:Open Source License

@Override
public void buttonPressed(int buttonId) {
    switch (buttonId) {
    case IDialogConstants.HELP_ID: {
        helpPressed();/* w  w w . j ava2 s  .  co  m*/
        break;
    }
    case IDialogConstants.BACK_ID: {
        WizardPageMod page = (WizardPageMod) getCurrentPage();
        if (page.backPressed()) // to handle custom events
            backPressed();
        break;
    }
    case IDialogConstants.NEXT_ID: {

        WizardPageMod page = (WizardPageMod) getCurrentPage();
        if (page.nextPressed()) // to handle custom events
            nextPressed();
        break;
    }
    case IDialogConstants.FINISH_ID: {
        finishPressed();
        break;
    }
    }
}