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.eclipse.birt.core.ui.frameworks.taskwizard.WizardBaseDialog.java

License:Open Source License

private void backPressed() {
    int i = this.wizardBase.vTaskIDs.indexOf(this.wizardBase.sCurrentActiveTask);
    if (i > 0) {
        cmpTaskContainer.setSelection(i - 1);
        this.wizardBase.switchTo(this.wizardBase.vTaskIDs.get(i - 1));
        getButton(IDialogConstants.NEXT_ID).setEnabled(true);
    }//w  w w  .  j a v a 2s  . c  om
    if (i == 1) {
        // Just switched to first tab
        getButton(IDialogConstants.BACK_ID).setEnabled(false);
    }
}

From source file:org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBaseDialog.java

License:Open Source License

private void nextPressed() {
    int i = this.wizardBase.vTaskIDs.indexOf(this.wizardBase.sCurrentActiveTask);
    if (i < this.wizardBase.vTaskIDs.size() - 1) {
        cmpTaskContainer.setSelection(i + 1);
        this.wizardBase.switchTo(this.wizardBase.vTaskIDs.get(i + 1));
        getButton(IDialogConstants.BACK_ID).setEnabled(true);
    }//from ww  w .  j a  va  2s.  c  om
    if (i == this.wizardBase.vTaskIDs.size() - 2) {
        getButton(IDialogConstants.NEXT_ID).setEnabled(false);
    }
}

From source file:org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBaseDialog.java

License:Open Source License

public void widgetSelected(SelectionEvent e) {
    if (e.getSource() instanceof CTabFolder) {
        String taskId = (String) e.item.getData();
        int indexLabel = this.wizardBase.vTaskIDs.indexOf(taskId);
        if (indexLabel >= 0) {
            this.wizardBase.switchTo(taskId);
            getButton(IDialogConstants.NEXT_ID).setEnabled(indexLabel < this.wizardBase.vTaskIDs.size() - 1);
            getButton(IDialogConstants.BACK_ID).setEnabled(indexLabel > 0);
        }// w ww.  j av  a 2 s  . c o  m
    } else if (e.getSource() instanceof ToolItem) {
        if (wizardBase.getTabToolButtons().contains(((ToolItem) e.getSource()).getData())) {
            IButtonHandler btnHandle = (IButtonHandler) ((ToolItem) e.getSource()).getData();
            btnHandle.run();
        }
    }

}

From source file:org.eclipse.buckminster.jnlp.p2.ui.general.wizard.AdvancedWizardDialog.java

License:Open Source License

public void disableNavigation() {
    getButton(IDialogConstants.BACK_ID).setEnabled(false);
    getButton(IDialogConstants.NEXT_ID).setEnabled(false);
    getButton(IDialogConstants.FINISH_ID).setEnabled(false);
}

From source file:org.eclipse.buckminster.jnlp.p2.wizard.install.StartPage.java

License:Open Source License

private void focusNextButton() {
    if (getInstallWizard().isProblemInProperties())
        ((AdvancedWizardDialog) getContainer()).getButtonFromButtonArea(IDialogConstants.CANCEL_ID).setFocus();
    else// w  w  w . j ava  2s . co  m
        ((AdvancedWizardDialog) getContainer()).getButtonFromButtonArea(IDialogConstants.NEXT_ID).setFocus();
}

From source file:org.eclipse.edt.ide.ui.internal.dialogs.MultiElementListSelectionDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    fBackButton = createButton(parent, IDialogConstants.BACK_ID, IDialogConstants.BACK_LABEL, false);
    fNextButton = createButton(parent, IDialogConstants.NEXT_ID, IDialogConstants.NEXT_LABEL, true);
    fFinishButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.FINISH_LABEL, false);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:org.eclipse.edt.ide.ui.internal.dialogs.MultiElementListSelectionDialog.java

License:Open Source License

protected void buttonPressed(int buttonId) {
    if (buttonId == IDialogConstants.BACK_ID) {
        turnPage(false);/*from   www .  jav a 2s .com*/
    } else if (buttonId == IDialogConstants.NEXT_ID) {
        turnPage(true);
    } else {
        super.buttonPressed(buttonId);
    }
}

From source file:org.eclipse.edt.ide.ui.internal.dialogs.MultiElementListSelectionDialog.java

License:Open Source License

/**
 * @see AbstractElementListSelectionDialog#handleDefaultSelected() 
 *//*  www.j  a  v  a 2s .  c  o m*/
protected void handleDefaultSelected() {
    if (validateCurrentSelection()) {
        if (fCurrentPage == fNumberOfPages - 1) {
            buttonPressed(IDialogConstants.OK_ID);
        } else {
            buttonPressed(IDialogConstants.NEXT_ID);
        }
    }
}

From source file:org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceWizardDialog.java

License:Open Source License

@Override
protected Button createButton(Composite parent, int id, String label, boolean defaultButton) {
    Button button = super.createButton(parent, id, label, defaultButton);
    switch (id) {
    case IDialogConstants.NEXT_ID:
        nextButton = button;/*ww w  .j  a  v a  2 s .  co m*/
        break;
    case IDialogConstants.BACK_ID:
        backButton = button;
        break;
    }
    return button;
}

From source file:org.eclipse.jface.tests.wizards.TheTestWizardDialog.java

License:Open Source License

public Button getNextButton() {
    return getButton(IDialogConstants.NEXT_ID);
}