List of usage examples for org.eclipse.jface.dialogs IDialogConstants OK_LABEL
String OK_LABEL
To view the source code for org.eclipse.jface.dialogs IDialogConstants OK_LABEL.
Click Source Link
From source file:nc.uap.lfw.funnode.FuncRegisterDialog.java
protected void createButtonsForButtonBar(Composite parent) { Button apply = createButton(parent, 50, "Apply", false); apply.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { processApply();//from w w w. j ava 2 s . c o m } }); // create OK and Cancel buttons by default createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:net.bioclipse.inchi.ui.InChIDialog.java
License:Open Source License
public static void openInformation(Shell parent, String title, Map<String, String> inchiMap, String message) { MessageDialog dialog = new InChIDialog(parent, title, null, // accept // the // default // window // icon inchiMap, message, INFORMATION, new String[] { IDialogConstants.OK_LABEL }, 0); // ok is the default dialog.open();// ww w . jav a 2s . c om return; }
From source file:net.bioclipse.structuredb.dialogs.ImportCompleteDialog.java
License:Open Source License
/** * Create contents of the button bar/*ww w .j a v a2 s. com*/ * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); }
From source file:net.bioclipse.ui.dialogs.PickWorkspaceDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { // clone workspace needs a lot of checks Button clone = createButton(parent, IDialogConstants.IGNORE_ID, "Clone Selected", false); clone.addListener(SWT.Selection, new Listener() { public void handleEvent(Event arg0) { try { String txt = _workspacePathCombo.getText(); File workspaceDirectory = new File(txt); if (!workspaceDirectory.exists()) { MessageDialog.openError(Display.getDefault().getActiveShell(), "Error", "The currently entered workspace path does not exist. Please enter a valid path."); return; }/* www .j a v a2 s. c o m*/ if (!workspaceDirectory.canRead()) { MessageDialog.openError(Display.getDefault().getActiveShell(), "Error", "The currently entered workspace path is not readable. Please check file system permissions."); return; } DirectoryDialog dd = new DirectoryDialog(Display.getDefault().getActiveShell()); dd.setText("Select folder for clone"); dd.setFilterPath(new File(txt).getParentFile().getAbsolutePath()); String directory = dd.open(); if (directory == null) { return; } File targetDirectory = new File(directory); if (targetDirectory.getAbsolutePath().equals(workspaceDirectory.getAbsolutePath())) { MessageDialog.openError(Display.getDefault().getActiveShell(), "Error", "Source and target workspaces are the same"); return; } // recursive check, if new directory is a subdirectory of our workspace, that's a big no-no or we'll // create directories forever if (isTargetSubdirOfDir(workspaceDirectory, targetDirectory)) { MessageDialog.openError(Display.getDefault().getActiveShell(), "Error", "Target folder is a subdirectory of the current workspace"); return; } try { copyFiles(workspaceDirectory, targetDirectory); } catch (Exception err) { MessageDialog.openError(Display.getDefault().getActiveShell(), "Error", "There was an error cloning the workspace: " + err.getMessage()); return; } boolean setActive = MessageDialog.openQuestion(Display.getDefault().getActiveShell(), "Workspace Cloned", "Would you like to set the newly cloned workspace to be the active one?"); if (setActive) { _workspacePathCombo.setText(directory); } } catch (Exception err) { MessageDialog.openError(Display.getDefault().getActiveShell(), "Error", "There was an internal error, please check the logs"); err.printStackTrace(); } } }); createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:net.ggtools.grand.ui.widgets.AboutDialog.java
License:Open Source License
/** * Method createButtonsForButtonBar.//from ww w. ja va 2 s.c o m * @param parent Composite * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite) */ @Override protected final void createButtonsForButtonBar(final Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); }
From source file:net.leboxondelex.daplomb.ui.dialogs.AboutDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { parent.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE)); createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); }
From source file:net.leboxondelex.daplomb.ui.dialogs.PreferencesDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { parent.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE)); parent.getParent().setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE)); createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); }
From source file:net.openchrom.xxd.processor.supplier.rscripting.ui.dialogs.SheetAskSizeDialog.java
License:Open Source License
/** * Create contents of the button bar./* www .j ava 2s . c o m*/ * * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { final Button button_1 = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); final Button button = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:net.refractions.udig.style.sld.editor.internal.EditorDialog.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); getShell().setDefaultButton(okButton); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); if (isHelpAvailable) { createButton(parent, IDialogConstants.HELP_ID, IDialogConstants.HELP_LABEL, false); }/* w w w . j a v a 2 s .co m*/ }
From source file:net.refractions.udig.ui.ExceptionDetailsDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false); detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL, false);/*from ww w .j ava2 s . c om*/ }