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.mindquarry.desktop.client.dialog.conflict.AbstractConflictDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { okButton = createButton(parent, IDialogConstants.OK_ID, I18N.getString("OK"), true); cancelButton = createButton(parent, IDialogConstants.CANCEL_ID, I18N.getString("Cancel Synchronization"), false);//from w ww. j a v a 2 s.com }
From source file:com.mindquarry.desktop.preferences.dialog.FilteredPreferenceDialog.java
License:Open Source License
@Override protected void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.OK_ID: { okPressed();/* w ww. jav a 2 s . co m*/ return; } case IDialogConstants.CANCEL_ID: { cancelPressed(); return; } case IDialogConstants.HELP_ID: { helpPressed(); return; } } }
From source file:com.mindquarry.desktop.preferences.dialog.FilteredPreferenceDialog.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); }
From source file:com.mobilesorcery.sdk.profiles.ui.internal.DeviceFilterDialog.java
License:Open Source License
public 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:com.mobilesorcery.sdk.profiles.ui.internal.SelectFilterTypeDialog.java
License:Open Source License
public void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); updateUI();//from w w w . j av a 2 s. c o m }
From source file:com.mobilesorcery.sdk.ui.targetphone.internal.EditDeviceListDialog.java
License:Open Source License
@Override public void createButtonsForButtonBar(Composite parent) { Button okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); updateButtons();/*from w w w. ja v a 2 s. co m*/ }
From source file:com.nextep.designer.vcs.ui.services.VersionUIHelper.java
License:Open Source License
/** * This method handles the startup of the versioning features. It handles the check of the * repository connection, its version, user setup and displays the appropriate wizards when * needed.//w w w. j a v a2 s .c o m * * @return <code>true</code> if startup requirements are ok, else </code>. Users should not go * on with the startup of neXtep if this method returns false. */ public static boolean startup() { final List<IWizardPage> pages = new ArrayList<IWizardPage>(); final IDatabaseConnector dbConnector = CoreUiPlugin.getRepositoryUIService().getRepositoryConnector(); final RepositoryStatus repositoryStatus = getRepositoryStatus(dbConnector); // Enabling controls switch (repositoryStatus) { case NO_CONNECTION: pages.add(new RepositoryUpgradeWizardPage(repositoryStatus)); pages.add(new RepositoryConnectionEditor()); break; case NO_REPOSITORY: pages.add(new RepositoryUpgradeWizardPage(repositoryStatus)); pages.add(new RepositoryInstallerMonitorPage(dbConnector)); pages.add(new UserCreationWizard()); break; case REPOSITORY_TOO_OLD: pages.add(new RepositoryUpgradeWizardPage(repositoryStatus)); pages.add(new RepositoryInstallerMonitorPage(dbConnector)); break; case CLIENT_TOO_OLD: // update manager cannot work here because the platform is not yet running // UpdateManagerUI.openInstaller(statusLabel.getShell()); IWorkspace view = new Workspace("Update view", ""); view.setId(1); VersionHelper.setCurrentView(view); break; } // Wizarding only if there's something to do... if (pages.size() > 0) { final Shell shell = Display.getDefault().getActiveShell(); try { final String title = VCSUIMessages.getString("repositoryUpgradeTitle"); //$NON-NLS-1$ Wizard wiz = new DefaultWizard(title) { @Override public boolean canFinish() { for (IWizardPage page : getPages()) { if (!page.isPageComplete()) { return false; } } return true; } @Override public boolean performCancel() { if (getContainer().getCurrentPage() instanceof RepositoryInstallerMonitorPage) { return false; } return super.performCancel(); } };// title,pages); WizardDialog d = new WizardDialog(shell, wiz) { @Override public void updateButtons() { super.updateButtons(); if (getCurrentPage() instanceof RepositoryInstallerMonitorPage) { getButton(IDialogConstants.CANCEL_ID).setEnabled(false); } } }; d.setHelpAvailable(true); d.setTitle(title); d.setBlockOnOpen(true); for (IWizardPage page : pages) { wiz.addPage(page); } // This setting overrides the computed size which might not be enough to display // correctly all controls d.setMinimumPageSize(500, 300); d.open(); if (d.getReturnCode() == Window.OK) { final IDatabaseConnector repoConnector = CoreUiPlugin.getRepositoryUIService() .getRepositoryConnector(); final RepositoryStatus newStatus = getRepositoryStatus(repoConnector); if (repositoryStatus == RepositoryStatus.NO_CONNECTION && newStatus != RepositoryStatus.NO_CONNECTION) { return startup(); } return newStatus == RepositoryStatus.OK; } else { return false; } } catch (CancelException e) { log.info("Action cancelled", e); return false; } catch (RuntimeException e) { MessageDialog.openError(shell, "Unexpected exception", "An unexpected exception was raised while checking the repository status, please contact neXtep Softwares.\nException was :\n" + e.getMessage()); log.error("Unexpected exception", e); return false; } } else { return true; } }
From source file:com.nokia.carbide.cdt.internal.builder.ui.TrackDependenciesQueryDialog.java
License:Open Source License
@Override public int open() { super.open(); if (userWantsToTrackDeps == true) { return IDialogConstants.OK_ID; } else {/* w w w. ja v a2 s.co m*/ return IDialogConstants.CANCEL_ID; } }
From source file:com.nokia.carbide.cpp.internal.project.ui.dialogs.UpdateProjectFilesQueryDialog.java
License:Open Source License
/** * Create contents of the button bar//from w w w.jav a 2 s . c o m * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.YES_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.NO_LABEL, false); }
From source file:com.nokia.carbide.cpp.internal.sdk.ui.AddSBSv2ProductVariant.java
License:Open Source License
/** * Create contents of the button bar/*from w w w . j a v a 2 s. 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); getButton(IDialogConstants.OK_ID).setEnabled(false); }