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

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

Introduction

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

Prototype

String OK_LABEL

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

Click Source Link

Document

The label for OK buttons.

Usage

From source file:com.amalto.workbench.dialogs.ViewInputDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    // create OK and Cancel buttons by default
    okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
    // do this here because setting the text will set enablement on the ok
    // button//from   w w w . ja v a  2 s .c  om
    okButton.setEnabled(false);
}

From source file:com.amalto.workbench.editors.DataClusterDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    Button okBtn = createButton(parent, Dialog.OK, okLabel != null ? okLabel : IDialogConstants.OK_LABEL,
            false);/*w w  w  .j  a  v  a2s.co  m*/
    createButton(parent, Dialog.CANCEL, cancelLabel != null ? cancelLabel : IDialogConstants.CANCEL_LABEL,
            false);
    if (additionSelectionListener != null) {
        okBtn.addSelectionListener(additionSelectionListener);
    }
}

From source file:com.amalto.workbench.editors.dialog.ConfirmFireEventMessageDialog.java

License:Open Source License

static String[] getButtonLabels(int kind) {
    String[] dialogButtonLabels;//w w  w .ja  va2s  .  c  o m
    switch (kind) {
    case ERROR:
    case INFORMATION:
    case WARNING: {
        dialogButtonLabels = new String[] { IDialogConstants.OK_LABEL };
        break;
    }
    case CONFIRM: {
        dialogButtonLabels = new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL };
        break;
    }
    case QUESTION: {
        dialogButtonLabels = new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL };
        break;
    }
    case QUESTION_WITH_CANCEL: {
        dialogButtonLabels = new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL,
                IDialogConstants.CANCEL_LABEL };
        break;
    }
    default: {
        throw new IllegalArgumentException("Illegal value for kind in MessageDialog.open()"); //$NON-NLS-1$
    }
    }
    return dialogButtonLabels;
}

From source file:com.amalto.workbench.editors.dialog.CustomInputDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    // create OK and Cancel buttons by default
    okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
    // do this here because setting the text will set enablement on the ok
    // button/*from  www  .j ava 2  s.  c  o m*/
    text.setFocus();
    if (value != null) {
        text.setText(value);
        text.selectAll();
    }
}

From source file:com.amazonaws.eclipse.elasticbeanstalk.DeploymentInformationDialog.java

License:Apache License

public DeploymentInformationDialog(Shell parentShell, Environment environment, String launchMode,
        boolean enableDebugging, boolean warnAboutIngress) {
    super(parentShell, "Publishing to AWS Elastic Beanstalk",
            AwsToolkitCore.getDefault().getImageRegistry().get(AwsToolkitCore.IMAGE_AWS_ICON),
            "Configure your environment deployment options", MessageDialog.NONE,
            new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0);

    this.enableDebugging = enableDebugging;
    this.warnAboutIngress = warnAboutIngress;
    this.environment = environment;
    this.launchMode = launchMode;

    this.versionLabel = "v" + System.currentTimeMillis();
}

From source file:com.amazonaws.eclipse.elasticbeanstalk.PublishDialog.java

License:Open Source License

public PublishDialog(Shell parentShell, String defaultVersionLabel) {
    super(parentShell, "Publishing to AWS Elastic Beanstalk",
            AwsToolkitCore.getDefault().getImageRegistry().get(AwsToolkitCore.IMAGE_AWS_ICON),
            "Select a label for your new application version.", MessageDialog.NONE,
            new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0);
    this.versionLabel = defaultVersionLabel;

    if (ElasticBeanstalkPlugin.getDefault().getDialogSettings()
            .getSection(PUBLISH_DIALOG_SETTINGS_SECTION) == null) {
        publishDialogSettings = ElasticBeanstalkPlugin.getDefault().getDialogSettings()
                .addNewSection(PUBLISH_DIALOG_SETTINGS_SECTION);
    } else {/*  www .ja  va 2  s .  c  o  m*/
        publishDialogSettings = ElasticBeanstalkPlugin.getDefault().getDialogSettings()
                .getSection(PUBLISH_DIALOG_SETTINGS_SECTION);
    }
}

From source file:com.amazonaws.eclipse.elasticbeanstalk.server.ui.configEditor.ExportTemplateDialog.java

License:Apache License

public ExportTemplateDialog(Shell parentShell, Collection<String> existingTemplateNames,
        String defaultTemplateName) {
    super(parentShell, "Export configuration template", null, "Choose a name and description for your template",
            MessageDialog.NONE, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0);
    this.templateName = defaultTemplateName;
    this.existingTemplateNames = existingTemplateNames;
}

From source file:com.amazonaws.eclipse.elasticbeanstalk.server.ui.configEditor.ImportTemplateDialog.java

License:Apache License

public ImportTemplateDialog(Shell parentShell, Collection<String> existingTemplateNames) {
    super(parentShell, "Import configuration template", null,
            "Choose the configuration template to import into the editor.  "
                    + "This will overwrite any unsaved values in the editor.",
            MessageDialog.NONE, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0);
    this.existingTemplateNames = existingTemplateNames;
}

From source file:com.android.ide.eclipse.adt.internal.build.ConvertSwitchDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.HELP_ID, IDialogConstants.HELP_LABEL, false);
}

From source file:com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigManagerDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    // we only want an OK button.
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
}