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:at.bestsolution.efxclipse.tooling.jdt.ui.internal.wizard.clazz.NewHtmlTemplateWizard.java
License:Open Source License
@Override protected IFile createFile() { IPath path;//from w w w. j ava 2 s .c om IPackageFragment fragment = getDomainClass().getPackageFragment(); if (fragment != null) { String cuName = getDomainClass().getName() + JavaFXUIPlugin.FILEEXTENSION_HTML_TEMPLATE; path = fragment.getPath().append(cuName); } else { String cuName = getDomainClass().getName() + JavaFXUIPlugin.FILEEXTENSION_HTML_TEMPLATE; IFolder p = (IFolder) getDomainClass().getFragmentRoot().getResource(); path = p.getLocation().append(cuName); } // If the path already exists then confirm overwrite. IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); if (file.exists()) { String[] buttons = new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }; String question = NLS.bind(IDEWorkbenchMessages.SaveAsDialog_overwriteQuestion, path.toString()); MessageDialog d = new MessageDialog(getShell(), IDEWorkbenchMessages.Question, null, question, MessageDialog.QUESTION, buttons, 0) { protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } }; int overwrite = d.open(); switch (overwrite) { case 0: // Yes break; case 1: // No return null; case 2: // Cancel default: return null; } } return file; }
From source file:at.medevit.elexis.gdt.ui.dialog.NeueUntersuchungAnfordernDialog.java
License:Open Source License
/** * Create contents of the button bar.// w w w .j a v a 2s .co 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:at.medevit.elexis.impfplan.ui.dialogs.SupplementVaccinationDialog.java
License:Open Source License
/** * Create contents of the button bar./* w w w . jav a2 s . com*/ * * @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:at.medevit.menus.dialog.AddPersonDialog.java
License:Open Source License
/** * Create contents of the button bar./*from ww w.j a v a2s . c om*/ * @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); m_bindingContext = initDataBindings(); }
From source file:at.spardat.xma.gui.mapper.BDInstanceSelectionDialog.java
License:Open Source License
/** * Adds buttons to this dialog's button bar. *///from w w w.j a v a2 s. co m 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:at.spardat.xma.guidesign.presentation.dialog.table.TransformTableLayoutDialog.java
License:Open Source License
/** * Create a button bar with only a ok button * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite) *///from w w w .java 2s. c o m protected void createButtonsForButtonBar(Composite parent) { // create OK button createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:au.gov.ansto.bragg.quokka.ui.workflow.AddConfigDialog.java
License:Open Source License
public AddConfigDialog(Shell parentShell, List<InstrumentConfigTemplate> standardTemplates) { super(parentShell, "Select instrument configuration", null, "Select a new instrument configuration: ", NONE, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0); setShellStyle(getShellStyle() | SWT.RESIZE); if (standardTemplates == null) { this.standardTemplates = new ArrayList<InstrumentConfigTemplate>(); } else {/*from www. j ava 2 s . c om*/ this.standardTemplates = standardTemplates; } allTemplates = new ArrayList<InstrumentConfigTemplate>(); loadConfigs(); }
From source file:au.gov.ansto.bragg.quokka.ui.workflow.SaveConfigDialog.java
License:Open Source License
public SaveConfigDialog(Shell parentShell, IObservableValue configDescription) { super(parentShell, "Save instrument configuration", null, "Please enter description:", NONE, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0); this.configDescription = configDescription; }
From source file:au.gov.ga.earthsci.catalog.ui.handler.BrowseInputDialog.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 . j av a 2 s .c om text.setFocus(); if (value != null) { text.setText(value); text.selectAll(); } }
From source file:au.gov.ga.earthsci.discovery.csw.CSWURLSelectionDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); validate();// ww w. j a va 2 s . c om }