List of usage examples for org.eclipse.jface.dialogs IDialogConstants CANCEL_LABEL
String CANCEL_LABEL
To view the source code for org.eclipse.jface.dialogs IDialogConstants CANCEL_LABEL.
Click Source Link
From source file:com.amalto.workbench.export.ImportItemsWizard.java
License:Open Source License
private int isOveride(String name, String obTypeName) { final MessageDialog dialog = new MessageDialog(getShell(), Messages.ImportItemsWizard_12, null, Messages.ImportItemsWizard_13 + obTypeName + Messages.ImportItemsWizard_14 + name + Messages.ImportItemsWizard_15, MessageDialog.QUESTION,//from ww w . ja v a 2 s . com new String[] { IDialogConstants.YES_LABEL, IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 0); dialog.open(); int result = dialog.getReturnCode(); if (result == 0) { return IDialogConstants.YES_ID; } if (result == 1) { return IDialogConstants.YES_TO_ALL_ID; } if (result == 2) { return IDialogConstants.NO_ID; } return IDialogConstants.CANCEL_ID; }
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. j a v a 2 s .co 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.amazonaws.eclipse.lambda.invoke.ui.InvokeFunctionInputDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, INVOKE_BUTTON_ID, "Invoke", true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.amitinside.e4.rcp.todo.dialogs.PasswordDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, "Login", true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.android.ide.eclipse.adt.internal.launch.DeviceChooserDialog.java
License:Open Source License
/** * Create the button bar: We override the Dialog implementation of this method * so that we can create the checkbox at the same level as the 'Cancel' and 'OK' buttons. *//*from w w w . jav a 2 s.com*/ @Override protected Control createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(1, false); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); mUseDeviceForFutureLaunchesCheckbox = new Button(composite, SWT.CHECK); mUseDeviceForFutureLaunchesCheckbox.setSelection(mUseDeviceForFutureLaunches); mResponse.setUseDeviceForFutureLaunches(mUseDeviceForFutureLaunches); mUseDeviceForFutureLaunchesCheckbox.setText("Use same device for future launches"); mUseDeviceForFutureLaunchesCheckbox.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { mUseDeviceForFutureLaunches = mUseDeviceForFutureLaunchesCheckbox.getSelection(); mResponse.setUseDeviceForFutureLaunches(mUseDeviceForFutureLaunches); } }); mUseDeviceForFutureLaunchesCheckbox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); createButton(composite, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(composite, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); return composite; }
From source file:com.android.ide.eclipse.adt.internal.wizards.newxmlfile.AddTranslationDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { mOkButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, // Don't make the OK button default as in most dialogs, since when you press // Return thinking you might edit a value it dismisses the dialog instead false);//from w ww . j av a2 s. c o m createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); mOkButton.setEnabled(false); validatePage(); }
From source file:com.android.ide.eclipse.auidt.internal.launch.DeviceChooserDialog.java
License:Open Source License
/** * Create the button bar: We override the Dialog implementation of this method * so that we can create the checkbox at the same level as the 'Cancel' and 'OK' buttons. *///from www . jav a 2 s .c om @Override protected Control createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(1, false); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); mUseDeviceForFutureLaunchesCheckbox = new Button(composite, SWT.CHECK); mUseDeviceForFutureLaunchesCheckbox.setSelection(sUseDeviceForFutureLaunchesValue); mResponse.setUseDeviceForFutureLaunches(sUseDeviceForFutureLaunchesValue); mUseDeviceForFutureLaunchesCheckbox.setText("Use same device for future launches"); mUseDeviceForFutureLaunchesCheckbox.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { sUseDeviceForFutureLaunchesValue = mUseDeviceForFutureLaunchesCheckbox.getSelection(); mResponse.setUseDeviceForFutureLaunches(sUseDeviceForFutureLaunchesValue); } }); mUseDeviceForFutureLaunchesCheckbox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); createButton(composite, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(composite, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); return composite; }