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

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

Introduction

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

Prototype

int FINISH_ID

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

Click Source Link

Document

Button id for a "Finish" button (value 16).

Usage

From source file:org.bonitasoft.studio.connectors.ui.wizard.TestConnectorDefinitionWizardDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    super.createButtonsForButtonBar(parent);
    getButton(IDialogConstants.FINISH_ID).setText(Messages.testConfiguration);
}

From source file:org.bonitasoft.studio.contract.ui.wizard.AddInputContractFromDataWizardDialog.java

License:Open Source License

@Override
public void moveFinishButton() {
    final Button finishButton = getButton(IDialogConstants.FINISH_ID);
    getFinishAndNewButton().moveAbove(finishButton);
    finishButton.setText(IDialogConstants.FINISH_LABEL);
}

From source file:org.bonitasoft.studio.data.ui.wizard.DataWizardDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    super.createButtonsForButtonBar(parent);
    if (dataSection != null) {
        createAndNewButton = super.createButton(parent, CREATE_AND_NEW_ID, Messages.createAndNewButton, true);
        setButtonLayoutData(createAndNewButton);
    }//from  ww  w . j a va2s  .com
    Button cancelButton = getButton(IDialogConstants.CANCEL_ID);
    cancelButton.setText(IDialogConstants.CANCEL_LABEL);
    Button finishButton = getButton(IDialogConstants.FINISH_ID);

    cancelButton.moveBelow(null);
    if (dataSection != null) {
        createAndNewButton.moveAbove(cancelButton);
        finishButton.setText(IDialogConstants.FINISH_LABEL);
    } else {
        finishButton.setText(IDialogConstants.OK_LABEL);

    }
    finishButton.moveAbove(createAndNewButton);
}

From source file:org.eclipse.b3.build.ui.commands.ConfigurableWizardDialog.java

License:Open Source License

public void configureButtonsForEndPage() {
    // disable Cancel
    Button b = getButton(IDialogConstants.CANCEL_ID);
    b.setEnabled(false);//from   ww w  .  j  a v  a2  s . c om

    // modify label of finish
    b = getButton(IDialogConstants.FINISH_ID);
    b.setText("Close");

    // hide next and previous buttons (if available
    b = getButton(IDialogConstants.NEXT_ID);
    if (b != null)
        b.setVisible(false);
    b = getButton(IDialogConstants.BACK_ID);
    if (b != null)
        b.setVisible(false);

}

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

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.BACK_ID, Messages.getString("WizardBase.Back"), //$NON-NLS-1$
            false);// ww  w .  j  a va2s.  c  o m
    createButton(parent, IDialogConstants.NEXT_ID, Messages.getString("WizardBase.Next"), //$NON-NLS-1$
            false);
    createButton(parent, IDialogConstants.FINISH_ID, Messages.getString("WizardBase.Finish"), //$NON-NLS-1$
            this.wizardBase.bEnterClosed);
    createButton(parent, IDialogConstants.CANCEL_ID, Messages.getString("WizardBase.Cancel"), //$NON-NLS-1$
            false);

    for (int i = 0; i < this.wizardBase.buttonList.size(); i++) {
        IButtonHandler buttonHandler = this.wizardBase.buttonList.get(i);
        // Make sure the same id was not registered.
        assert getButton(buttonHandler.getId()) == null;
        buttonHandler.setButton(createButton(parent, buttonHandler.getId(), buttonHandler.getLabel(), false));
    }

    // Update buttons status
    int taskIndex = this.wizardBase.vTaskIDs.indexOf(this.wizardBase.sCurrentActiveTask);
    if (taskIndex > 0) {
        getButton(IDialogConstants.BACK_ID).setEnabled(true);
    } else {
        getButton(IDialogConstants.BACK_ID).setEnabled(false);
    }
    if (taskIndex < this.wizardBase.vTaskIDs.size() - 1) {
        getButton(IDialogConstants.NEXT_ID).setEnabled(true);
    } else {
        getButton(IDialogConstants.NEXT_ID).setEnabled(false);
    }
}

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

License:Open Source License

protected void buttonPressed(int buttonId) {
    if (IDialogConstants.FINISH_ID == buttonId) {
        okPressed();// w w w.j ava 2s .c  o  m
    } else if (IDialogConstants.CANCEL_ID == buttonId) {
        cancelPressed();
    } else if (IDialogConstants.BACK_ID == buttonId) {
        backPressed();
    } else if (IDialogConstants.NEXT_ID == buttonId) {
        nextPressed();
    }

    for (int i = 0; i < this.wizardBase.buttonList.size(); i++) {
        IButtonHandler buttonHandler = this.wizardBase.buttonList.get(i);
        if (buttonId == buttonHandler.getId()) {
            buttonHandler.run();
            break;
        }
    }
}

From source file:org.eclipse.birt.report.designer.internal.ui.dialogs.WizardDialog.java

License:Open Source License

/**
 * Sets the label of Finish button//from ww w .  j  a v a2  s  . c om
 * 
 * @param text
 *            the new label of the Finish button
 */
public void setFinishLabel(String text) {
    getButton(IDialogConstants.FINISH_ID).setText(text);
}

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

License:Open Source License

@Override
public void updateButtons() {
    super.updateButtons();

    String finishButtonText = ((AdvancedWizardPage) getCurrentPage()).getOverrideFinishButtonText();

    if (finishButtonText != null) {
        getButton(IDialogConstants.FINISH_ID).setText(finishButtonText);
    }//from   w ww.  ja  va2  s .c  o  m

    String cancelButtonText = ((AdvancedWizardPage) getCurrentPage()).getOverrideCancelButtonText();

    if (cancelButtonText != null) {
        getButton(IDialogConstants.CANCEL_ID).setText(cancelButtonText);
    }

    int defaultButtonId = ((AdvancedWizardPage) getCurrentPage()).getOverrideDefaultButtonId();

    if (defaultButtonId != -1) {
        getShell().setDefaultButton(getButton(defaultButtonId));
    }
}

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.cdt.arduino.ui.internal.downloads.ArduinoDownloadsManager.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    super.createButtonsForButtonBar(parent);
    getButton(IDialogConstants.CANCEL_ID).setVisible(false);
    Button finishButton = getButton(IDialogConstants.FINISH_ID);
    finishButton.setText("Done");
    // make sure it's far right
    finishButton.moveBelow(null);//  w  w  w.  ja  v  a 2  s  .co  m
}