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:edu.kit.joana.ui.ifc.sdg.gui.views.LatticeDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); if (fAddCancelButton) { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true); }//from www.ja va 2 s.c o m }
From source file:edu.tsinghua.lumaqq.ui.helper.ShellLauncher.java
License:Open Source License
/** * ??//from w ww . j a v a 2 s .c o m * * @param url * URL * @param title * ? * @param errorString * ? */ public void openBrowserShell(String url, String title, String errorString) { // ????? String browser = main.getOptionHelper().getBrowser(); try { if (browser.equals("")) { MessageDialog dialog = new MessageDialog(main.getShell(), message_box_common_question_title, null, message_box_browser_not_set, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 0); switch (dialog.open()) { case 0: main.getShellLauncher().openSystemOptionWindow().setCurrentPage(SystemOptionWindow.OTHER); break; case 1: BrowserShell bs = ShellFactory.createBrowserShell(main); bs.setUrl(url); bs.setTitle(title); bs.open(); break; } } else Runtime.getRuntime().exec(browser.replaceAll("\\[URL\\]", url)); } catch (Throwable t) { MessageDialog.openWarning(main.getShell(), message_box_common_warning_title, errorString); } }
From source file:edu.umd.cs.eclipse.courseProjectManager.PasswordDialog.java
License:Apache 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); if (password != null) { passwordText.setText(password);/*from w w w.ja v a 2 s . c o m*/ passwordText.selectAll(); } usernameText.setFocus(); if (username != null) { usernameText.setText(username); usernameText.selectAll(); } }
From source file:edu.umd.cs.eclipse.courseProjectManager.SubmitUserDialog.java
License:Apache 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); userDataText.setFocus();/*from www. ja v a 2s. c o m*/ if (userData != null) { userDataText.setText(userData); userDataText.selectAll(); } }
From source file:es.axios.udig.spatialoperations.internal.ui.dialogs.CreateNewLayerDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { this.okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); this.cancelButton = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:es.cv.gvcase.mdt.common.part.MOSKittMultiPageEditor.java
License:Open Source License
/** * {@link ISaveablePart2} implementation. <br> * Will ask nested editors that implement ISaveablePart2 to perform their * prompt./* ww w.j a v a 2 s . c om*/ * */ public int promptToSaveOnClose() { // clear the previous map mapEditorIndex2SaveOnClose.clear(); int saveOption = ISaveablePart2.DEFAULT; boolean saveNeeded = false; ISaveablePart saveablePart1 = null; ISaveablePart2 saveablePart2 = null; String partsNamesToSave = ""; //$NON-NLS-1$ for (int i = 0; i < getPageCount(); i++) { IEditorPart editor = getEditor(i); if (editor == null) { continue; } saveablePart1 = (ISaveablePart) Platform.getAdapterManager().getAdapter(editor, ISaveablePart.class); saveablePart2 = (ISaveablePart2) Platform.getAdapterManager().getAdapter(editor, ISaveablePart2.class); if (saveablePart2 != null) { saveOption = saveablePart2.promptToSaveOnClose(); } else if (saveablePart1 != null) { saveOption = saveablePart1.isSaveOnCloseNeeded() ? ISaveablePart2.YES : ISaveablePart2.NO; } else { saveOption = ISaveablePart2.DEFAULT; } mapEditorIndex2SaveOnClose.put(i, saveOption); if (saveOption == ISaveablePart2.YES) { saveNeeded = true; partsNamesToSave += ((partsNamesToSave.length() == 0 ? "" //$NON-NLS-1$ : ", ") + getPageText(i)); //$NON-NLS-1$ } } if (saveNeeded) { String message = Messages.MOSKittMultiPageEditor_15; String[] buttons = new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }; MessageDialog dialog = new MessageDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), Messages.MOSKittMultiPageEditor_16, null, message, MessageDialog.QUESTION, buttons, 0) { protected int getShellStyle() { return SWT.CLOSE | SWT.TITLE | SWT.BORDER | SWT.APPLICATION_MODAL | getDefaultOrientation(); } }; int choice = ISaveablePart2.NO; choice = dialog.open(); // map value of choice back to ISaveablePart2 values switch (choice) { case 0: // Yes choice = ISaveablePart2.YES; break; case 1: // No choice = ISaveablePart2.NO; break; case 2: // Cancel choice = ISaveablePart2.CANCEL; break; default: // ?? choice = ISaveablePart2.DEFAULT; break; } return choice; } else { return ISaveablePart2.NO; } }
From source file:eu.aniketos.wp1.ststool.commitments.actions.FilterDialog.java
License:Open Source License
/** * Create contents of the button bar./*from ww w .j av a 2 s . c o m*/ * * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:eu.esdihumboldt.hale.ui.codelist.selector.CodeListSelectionDialog.java
License:Open Source License
/** * @see Dialog#createButtonsForButtonBar(Composite) *///w ww . ja va 2s . co m @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); createButton(parent, NONE_ID, Messages.CodeListSelectionDialog_4, //$NON-NLS-1$ false); }
From source file:eu.esdihumboldt.hale.ui.common.definition.AttributeInputDialog.java
License:Open Source License
/** * @see Dialog#createButtonsForButtonBar(Composite) *//*from w w w . jav a 2 s .c o m*/ @Override protected void createButtonsForButtonBar(Composite parent) { Button okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); okButton.setEnabled(editor.isValid()); }
From source file:eu.geclipse.core.sla.ui.dialogs.SlaTermInputDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { // create OK and Cancel buttons by default this.okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }