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.buildml.eclipse.actions.dialogs.MatchPatternSelectionDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { /* /*from w w w . j a v a 2s .c om*/ * Replace the standard "OK" label with the name of the operation we're performing * (e.g "Delete" or "Make Atomic". */ createButton(parent, IDialogConstants.OK_ID, operation, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.buildml.eclipse.utils.NameFilterDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, "Select", true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); /* disable the OK button by default, until some text is entered */ getButton(OK).setEnabled(false);/*w w w . j ava 2s.co m*/ }
From source file:com.byterefinery.rmbench.dialogs.AbstractDependencyDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true); detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL, false);/* w w w . j a v a2s . c o m*/ }
From source file:com.byterefinery.rmbench.util.ModelManager.java
License:Open Source License
/** * show a 3-option dialog asking the user whether the current model should be saved * // w ww.j a va 2s .c om * @return false if the dialog was cancelled, and thus the operation should not * proceed */ private boolean querySaveModel(final Shell shell) { MessageDialog dialog = new MessageDialog(shell, RMBenchMessages.ModelView_SaveDlg_Title, null, RMBenchMessages.ModelView_SaveChanged_Message, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 0); int result = dialog.open(); if (result == 0) { IRunnableWithProgress runnable = new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { doSave(shell, monitor); } }; try { new ProgressMonitorDialog(shell).run(false, true, runnable); } catch (InvocationTargetException e) { RMBenchPlugin.logError(e); } catch (InterruptedException e) { RMBenchPlugin.logError(e); } } return result != 2; }
From source file:com.centurylink.mdw.plugin.designer.dialogs.ActivityInstanceDialog.java
License:Apache License
protected void createButtonsForButtonBar(Composite parent) { if (mode.equals(Mode.VIEW)) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); return;/*from ww w . j a v a 2 s . c om*/ } if (mode.equals(Mode.RETRY)) { retryButton = createButton(parent, -1, "Retry", false); retryButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() { public void run() { statusMessage = activity.getProject().getDesignerProxy().retryActivityInstance(activity, activityInstanceVO); } }); if (statusMessage == null || statusMessage.trim().length() == 0) MessageDialog.openInformation(getShell(), "Retry Activity", "Activity instance: " + activityInstanceVO.getId() + " retried"); else MessageDialog.openError(getShell(), "Retry Activity", statusMessage); close(); } }); if (!activity.getProcess().isUserAuthorized(UserRoleVO.PROCESS_EXECUTION)) retryButton.setEnabled(false); } if (mode.equals(Mode.SKIP)) { skipButton = createButton(parent, -1, "Proceed", false); skipButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() { public void run() { statusMessage = activity.getProject().getDesignerProxy().skipActivityInstance(activity, activityInstanceVO, completionCode); } }); if (statusMessage == null || statusMessage.trim().length() == 0) MessageDialog.openInformation(getShell(), "Skip Activity", "Activity instance: " + activityInstanceVO.getId() + " skipped with completion code: " + completionCode + "."); else MessageDialog.openError(getShell(), "Skip Activity", statusMessage); close(); } }); if (!activity.getProcess().isUserAuthorized(UserRoleVO.PROCESS_EXECUTION)) skipButton.setEnabled(false); } createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true); }
From source file:com.centurylink.mdw.plugin.designer.dialogs.ArchivedProcessSaveDialog.java
License:Apache License
protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, respondingToClose ? "Save" : "OK", false); if (respondingToClose) { Button dontSaveButton = createButton(parent, IDialogConstants.CLOSE_ID, "Don't Save", true); dontSaveButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { dontSavePressed();//from w w w . j a va 2 s .com } }); dontSaveButton.forceFocus(); } Button cancelButton = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, !respondingToClose); if (!respondingToClose) cancelButton.forceFocus(); }
From source file:com.centurylink.mdw.plugin.designer.dialogs.ProcessInstanceFilterDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); Button resetButton = createButton(parent, RESET_ID, "Reset", false); resetButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { resetFields();/*from www. j a v a 2 s. c o m*/ } }); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.centurylink.mdw.plugin.designer.dialogs.ProcessSaveDialog.java
License:Apache License
protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, respondingToClose ? "Save" : "OK", true); if (respondingToClose) { Button dontSaveButton = createButton(parent, IDialogConstants.CLOSE_ID, "Don't Save", false); dontSaveButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { dontSavePressed();/*from ww w .j ava 2 s .com*/ } }); } createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.centurylink.mdw.plugin.designer.dialogs.ValueDisplayDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { Button okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); okButton.forceFocus();// ww w . java 2 s.c om if (createCancelButton) createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.centurylink.mdw.plugin.designer.dialogs.VersionableImportDialog.java
License:Apache License
protected void createButtonsForButtonBar(Composite parent) { importButton = createButton(parent, IDialogConstants.OK_ID, "Import", true); importButton.setEnabled(false);/* w w w . j a v a2 s. c o m*/ createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }