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.centurylink.mdw.plugin.designer.dialogs.VersionableSaveDialog.java
License:Apache License
protected void createButtonsForButtonBar(Composite parent) { saveButton = createButton(parent, IDialogConstants.OK_ID, "Save", true); if (versionable.getProject().isProduction()) saveButton.setEnabled(false);/*from w ww . j av a 2s . co m*/ if (hasCloseWithoutSaveOption) createButton(parent, IDialogConstants.NO_ID, "Don't Save", false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.centurylink.mdw.plugin.designer.dialogs.WorkflowElementDeleteDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, PROMPT, "Prompt", false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.ceteva.mosaic.MessageDialogWithToggle.java
License:Open Source License
/** * Convenience method to open a simple confirm (OK/Cancel) dialog. * * @param parent the parent shell of the dialog, or <code>null</code> if none * @param title the dialog's title, or <code>null</code> if none * @param message the message// w w w. ja va 2s . co m * @param toggleMessage the message for the toggle control, or <code>null</code> * for the default message ("Don't show me this message again"). * @param toggleState the initial state for the toggle * @return the dialog, after being closed by the user, which the client can * only call <code>getReturnCode()</code> or <code>getToggleState()</code> */ public static MessageDialogWithToggle openConfirm(Shell parent, String title, String message, String toggleMessage, boolean toggleState) { MessageDialogWithToggle dialog = new MessageDialogWithToggle(parent, title, null, // accept the default window icon message, QUESTION, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0, // OK is the default toggleMessage, toggleState); dialog.open(); return dialog; }
From source file:com.cloudbees.eclipse.dev.ui.views.build.DeployWarAppDialog.java
License:Open Source License
/** * Create contents of the button bar.//www. j av a2 s. c o m * @param parent */ @Override protected void createButtonsForButtonBar(final Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.codesourcery.internal.installer.ui.WizardDialog.java
License:Open Source License
/** * Creates the Cancel button for this wizard dialog. Creates a standard (<code>SWT.PUSH</code>) * button and registers for its selection events. Note that the number of * columns in the button bar composite is incremented. The Cancel button is * created specially to give it a removeable listener. * // ww w. ja v a 2s.c o m * @param parent * the parent button bar * @return the new Cancel button */ private Button createCancelButton(Composite parent) { // increment the number of columns in the button bar ((GridLayout) parent.getLayout()).numColumns++; Button button = new Button(parent, SWT.PUSH); button.setText(IDialogConstants.CANCEL_LABEL); setButtonLayoutData(button); button.setFont(parent.getFont()); button.setData(new Integer(IDialogConstants.CANCEL_ID)); button.addSelectionListener(cancelListener); return button; }
From source file:com.conwet.wirecloud.ide.wizards.WizardProjectsImportPage.java
License:Open Source License
/** * The <code>WizardDataTransfer</code> implementation of this * <code>IOverwriteQuery</code> method asks the user whether the existing * resource at the given path should be overwritten. * * @param pathString//www.j a v a 2s . c o m * @return the user's reply: one of <code>"YES"</code>, <code>"NO"</code>, * <code>"ALL"</code>, or <code>"CANCEL"</code> */ public String queryOverwrite(String pathString) { Path path = new Path(pathString); String messageString; // Break the message up if there is a file name and a directory // and there are at least 2 segments. if (path.getFileExtension() == null || path.segmentCount() < 2) { messageString = NLS.bind(IDEWorkbenchMessages.WizardDataTransfer_existsQuestion, pathString); } else { messageString = NLS.bind(IDEWorkbenchMessages.WizardDataTransfer_overwriteNameAndPathQuestion, path.lastSegment(), path.removeLastSegments(1).toOSString()); } final MessageDialog dialog = new MessageDialog(getContainer().getShell(), IDEWorkbenchMessages.Question, null, messageString, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.NO_TO_ALL_LABEL, IDialogConstants.CANCEL_LABEL }, 0) { protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } }; String[] response = new String[] { YES, ALL, NO, NO_ALL, CANCEL }; // run in syncExec because callback is from an operation, // which is probably not running in the UI thread. getControl().getDisplay().syncExec(new Runnable() { public void run() { dialog.open(); } }); return dialog.getReturnCode() < 0 ? CANCEL : response[dialog.getReturnCode()]; }
From source file:com.drgarbage.utils.Messages.java
License:Apache License
/** * @see #openConfirm(Shell, String, String, String[]) *//* ww w .j a va2 s . co m*/ public static boolean openConfirm(Shell parent, String title, String message) { return openConfirm(parent, title, message, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }); }
From source file:com.drgarbage.utils.Messages.java
License:Apache License
/** * @see #openSelectDialog(Shell, String, String, String[], List) *//* w w w. jav a2s .c om*/ public static String openSelectDialog(Shell parent, String title, String message, Image selectionListImage, List<String> elementList) { return openSelectDialog(parent, title, message, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, selectionListImage, elementList); }
From source file:com.dubture.symfony.debug.launch.SymfonyURLLaunchDialog.java
License:Open Source License
public SymfonyURLLaunchDialog(ILaunchConfigurationWorkingCopy launchConfiguration, String title, Route route) { super(PHPDebugUIPlugin.getActiveWorkbenchShell(), title, null, "", INFORMATION, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0); this.launchConfiguration = launchConfiguration; this.route = route; message = "Note that no files will be published to the server."; }
From source file:com.ecfeed.ui.dialogs.AddTestCaseDialog.java
License:Open Source License
/** * Create contents of the button bar./*w w w .jav a 2s . co m*/ * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { fOkButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }