List of usage examples for org.eclipse.jface.dialogs IDialogConstants CANCEL_ID
int CANCEL_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants CANCEL_ID.
Click Source Link
From source file:com.hangum.tadpole.rdb.core.dialog.restfulapi.MainSQLEditorAPIServiceDialog.java
License:Open Source License
/** * Create contents of the button bar.//from w w w. j a v a2s .c o m * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, Messages.get().RUN, true); createButton(parent, IDialogConstants.CANCEL_ID, Messages.get().Close, false); }
From source file:com.hangum.tadpole.rdb.core.editors.main.composite.direct.SQLUpdateDialog.java
License:Open Source License
/** * Create contents of the button bar./*from w w w . j a va2 s .c o m*/ * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, Messages.get().Update, true); createButton(parent, IDialogConstants.CANCEL_ID, Messages.get().Close, false); }
From source file:com.hangum.tadpole.rdb.core.editors.main.parameter.ParameterDialog.java
License:Open Source License
/** * Create contents of the button bar./*from w w w .ja va 2s . c o m*/ * * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, "OK", true); createButton(parent, IDialogConstants.CANCEL_ID, "Close", false); // Button button = createButton(parent, IDialogConstants.CANCEL_ID, "Close", false); // button.addSelectionListener(new SelectionAdapter() { // @Override // public void widgetSelected(SelectionEvent e) { // parameters.clear(); // } // }); }
From source file:com.hangum.tadpole.sql.dialog.save.ResourceSaveDialog.java
License:Open Source License
/** * Create contents of the button bar.//www .j av a 2 s. com * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, "Save", true); //$NON-NLS-1$ createButton(parent, IDialogConstants.CANCEL_ID, "Cancel", false); //$NON-NLS-1$ }
From source file:com.helio.boomer.rap.security.login.AbstractLoginDialog.java
License:Open Source License
public void handle(final Callback[] callbacks) throws IOException { this.callbackArray = callbacks; final Display display = Display.getDefault(); display.syncExec(new Runnable() { public void run() { isCancelled = false;/*from ww w. j av a2 s. c om*/ setBlockOnOpen(false); open(); final Button okButton = getButton(IDialogConstants.OK_ID); okButton.setText("Login"); okButton.addSelectionListener(new SelectionListener() { public void widgetSelected(final SelectionEvent event) { processCallbacks = true; } public void widgetDefaultSelected(final SelectionEvent event) { // nothing to do } }); final Button cancel = getButton(IDialogConstants.CANCEL_ID); cancel.addSelectionListener(new SelectionListener() { public void widgetSelected(final SelectionEvent event) { isCancelled = true; processCallbacks = true; } public void widgetDefaultSelected(final SelectionEvent event) { // nothing to do } }); } }); try { ModalContext.setAllowReadAndDispatch(true); // Works for now. ModalContext.run(new IRunnableWithProgress() { public void run(final IProgressMonitor monitor) { // Wait here until OK or cancel is pressed, then let it rip. The event listener // is responsible for closing the dialog (in the loginSucceeded event). while (!processCallbacks) { try { Thread.sleep(100); } catch (final Exception e) { // do nothing } } processCallbacks = false; // Call the adapter to handle the callbacks if (!isCancelled()) internalHandle(); } }, true, new NullProgressMonitor(), Display.getDefault()); } catch (final Exception e) { final IOException ioe = new IOException(); ioe.initCause(e); throw ioe; } }
From source file:com.heroku.eclipse.ui.git.HerokuCredentialsProvider.java
License:Open Source License
/** * Opens a dialog for a single non-user, non-password type item. * @param shell the shell to use// w w w. j av a 2s . c o m * @param uri the uri of the get request * @param item the item to handle * @return <code>true</code> if the request was successful and values were supplied; * <code>false</code> if the user canceled the request and did not supply all requested values. */ private boolean getSingleSpecial(Shell shell, URIish uri, CredentialItem item) { if (item instanceof CredentialItem.InformationalMessage) { MessageDialog.openInformation(shell, UIText.EGitCredentialsProvider_information, item.getPromptText()); return true; } else if (item instanceof CredentialItem.YesNoType) { CredentialItem.YesNoType v = (CredentialItem.YesNoType) item; String[] labels = new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }; int[] resultIDs = new int[] { IDialogConstants.YES_ID, IDialogConstants.NO_ID, IDialogConstants.CANCEL_ID }; MessageDialog dialog = new MessageDialog(shell, UIText.EGitCredentialsProvider_question, null, item.getPromptText(), MessageDialog.QUESTION_WITH_CANCEL, labels, 0); dialog.setBlockOnOpen(true); int r = dialog.open(); if (r < 0) { return false; } switch (resultIDs[r]) { case IDialogConstants.YES_ID: { v.setValue(true); return true; } case IDialogConstants.NO_ID: { v.setValue(false); return true; } default: // abort return false; } } else { // generically handles all other types of items return getMultiSpecial(shell, uri, item); } }
From source file:com.htmlhifive.tools.jslint.dialog.ConfirmLicenseDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true).setEnabled(false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); initialDataBinding();/* w w w . j a v a 2s .c o m*/ textLicenseText.setText(license); }
From source file:com.htmlhifive.tools.jslint.dialog.CreateEngineDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); initialDataBinding();// ww w .ja v a 2 s . co m setMessage(Messages.DL0027.getText(), IMessageProvider.INFORMATION); }
From source file:com.htmlhifive.tools.jslint.dialog.CreateOptionFileDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true).setEnabled(false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.hypersocket.client.gui.LogonDialog.java
License:Open Source License
/** * Create contents of the button bar.//from ww w. j a v a2 s. co m * * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, I18N.getResource("text.ok"), true); createButton(parent, IDialogConstants.CANCEL_ID, I18N.getResource("text.cancel"), false); }