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.ecfeed.ui.dialogs.RenameTestSuiteDialog.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) { fOkButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); fOkButton.setEnabled(false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.ecfeed.ui.dialogs.SetupDialogGenerator.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { fOkButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); if (fGenerateExecutableContent) { for (MethodParameterNode parameter : fMethod.getMethodParameters()) { EImplementationStatus parameterStatus = fStatusResolver.getImplementationStatus(parameter); if ((parameter.getChoices().isEmpty() && (parameter.isExpected() == false || JavaUtils.isUserType(parameter.getType()))) || parameterStatus == EImplementationStatus.NOT_IMPLEMENTED) { setOkButtonStatus(false); break; }//w w w . j av a 2s .co m } } else { for (MethodParameterNode parameter : fMethod.getMethodParameters()) { if (parameter.getChoices().isEmpty() && (parameter.isExpected() == false || JavaUtils.isUserType(parameter.getType()))) { setOkButtonStatus(false); break; } } } createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); updateOkButtonAndErrorMsg(); }
From source file:com.generalrobotix.ui.view.graph.SeriesDialog.java
License:Open Source License
protected void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.OK_ID) { ArrayList<DataItemInfo> newDataItemInfoList = new ArrayList<DataItemInfo>(); for (int i = 0; i < tableModel_.getRowCount(); i++) { String fullName = tableModel_.getString(i); Iterator<DataItemInfo> it = dataItemInfoList_.iterator(); boolean contain = false; while (it.hasNext()) { DataItemInfo info = it.next(); if (fullName.equals(info.dataItem.toString())) { info.color = (RGB) tableModel_.getValueAt(i, 3); info.legend = (String) tableModel_.getValueAt(i, 4); newDataItemInfoList.add(info); dataItemInfoList_.remove(info); contain = true;/*from w w w .ja v a 2 s . co m*/ break; } } if (!contain) { addedList_.add(tableModel_.getItem(i)); } } Iterator<DataItemInfo> it = dataItemInfoList_.iterator(); while (it.hasNext()) { removedList_.add(it.next()); } dataItemInfoArray_ = newDataItemInfoList.toArray(new DataItemInfo[0]); removedArray_ = removedList_.toArray(new DataItemInfo[0]); removeAllRows(); addedArray_ = addedList_.toArray(new DataItemInfo[0]); updated_ = true; } else if (buttonId == IDialogConstants.CANCEL_ID) { removeAllRows(); } setReturnCode(buttonId); close(); super.buttonPressed(buttonId); }
From source file:com.genuitec.eclipse.gerrit.tools.dialogs.SettingsDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { parent.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, false, false)); createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); revalidate();// www . j av a2 s. c om }
From source file:com.genuitec.org.eclipse.egit.ui.internal.branch.BranchOperationUI.java
License:Open Source License
private boolean shouldCancelBecauseOfRunningLaunches() { if (mode == MODE_CHECKOUT) return false; IPreferenceStore store = Activator.getDefault().getPreferenceStore(); if (!store.getBoolean(UIPreferences.SHOW_RUNNING_LAUNCH_ON_CHECKOUT_WARNING)) return false; ILaunchConfiguration launchConfiguration = getRunningLaunchConfiguration(); if (launchConfiguration != null) { String[] buttons = new String[] { UIText.BranchOperationUI_Continue, IDialogConstants.CANCEL_LABEL }; String message = NLS.bind(UIText.BranchOperationUI_RunningLaunchMessage, launchConfiguration.getName()); MessageDialogWithToggle continueDialog = new MessageDialogWithToggle(getShell(), UIText.BranchOperationUI_RunningLaunchTitle, null, message, MessageDialog.NONE, buttons, 0, UIText.BranchOperationUI_RunningLaunchDontShowAgain, false); int result = continueDialog.open(); // cancel if (result == IDialogConstants.CANCEL_ID || result == SWT.DEFAULT) return true; boolean dontWarnAgain = continueDialog.getToggleState(); if (dontWarnAgain) store.setValue(UIPreferences.SHOW_RUNNING_LAUNCH_ON_CHECKOUT_WARNING, false); }/* ww w. j a v a2s . c om*/ return false; }
From source file:com.genuitec.org.eclipse.egit.ui.internal.branch.CleanupUncomittedChangesDialog.java
License:Open Source License
@Override protected void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.PROCEED_ID: CommitUI commitUI = new CommitUI(getShell(), repository, new IResource[0], true); shouldContinue = commitUI.commit(); break;/*from w w w . j a va 2 s .com*/ case IDialogConstants.ABORT_ID: final ResetOperation operation = new ResetOperation(repository, Constants.HEAD, ResetType.HARD); String jobname = NLS.bind(UIText.ResetAction_reset, Constants.HEAD); JobUtil.scheduleUserWorkspaceJob(operation, jobname, JobFamilies.RESET); shouldContinue = true; break; case IDialogConstants.SKIP_ID: StashCreateUI stashCreateUI = new StashCreateUI(repository); shouldContinue = stashCreateUI.createStash(getShell()); break; case IDialogConstants.CANCEL_ID: } super.buttonPressed(buttonId); }
From source file:com.genuitec.org.eclipse.egit.ui.internal.branch.CleanupUncomittedChangesDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); createButton(parent, IDialogConstants.PROCEED_ID, UIText.BranchResultDialog_buttonCommit, false); createButton(parent, IDialogConstants.SKIP_ID, UIText.BranchResultDialog_buttonStash, false); createButton(parent, IDialogConstants.ABORT_ID, UIText.BranchResultDialog_buttonReset, false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true); }
From source file:com.github.sdbg.debug.ui.internal.dialogs.ManageLaunchesDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { // Close/*from ww w . j av a2s.c om*/ createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CLOSE_LABEL, false); // Apply createButton(parent, IDialogConstants.CLIENT_ID, "Apply", false); getButton(IDialogConstants.CLIENT_ID).addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { handleApplyButton(); } }); // Run createButton(parent, IDialogConstants.OK_ID, Messages.ManageLaunchesDialog_launchRun, true); updateButtons(); }
From source file:com.google.cloud.tools.eclipse.usagetracker.OptInDialog.java
License:Apache License
/** * Create buttons./*from w ww .java2 s . c o m*/ */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, Messages.OPT_IN_BUTTON, false); createButton(parent, IDialogConstants.CANCEL_ID, Messages.OPT_OUT_BUTTON, true); }
From source file:com.google.dart.tools.search.internal.ui.util.ExtendedDialogWindow.java
License:Open Source License
@Override protected void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.CANCEL_ID: if (fActiveRunningOperations == 0) { close();//www . j a v a 2 s. c om } break; default: if (performAction(buttonId)) { close(); } } }