List of usage examples for org.eclipse.jface.wizard Wizard setNeedsProgressMonitor
public void setNeedsProgressMonitor(boolean b)
From source file:eu.celar.ui.UIAuthTokenProvider.java
License:Open Source License
/** * Show the new token wizard. If the specified description is not null the wizard will * be started with the wizard page belonging to the specified description. Otherwise it * will be started with the token type page as starting page where the user can choose * the type of the he wants to create./*w ww.j a v a 2 s .co m*/ * * @param tokenWizardId The ID of the token type that should be created or null. * @param forceWizardId * @param description Token description passed to the token specific wizard pages in * order to allow initialisation for a predefined token type. * @return True if the token dialog was closed with status {@link Window#OK}. */ public boolean showNewTokenWizard(final String tokenWizardId, final boolean forceWizardId, final IAuthenticationTokenDescription description) { URL imgUrl = Activator.getDefault().getBundle().getEntry("icons/wizban/newtoken_wiz.gif"); //$NON-NLS-1$ Wizard wizard = new Wizard() { @Override public boolean performFinish() { return false; } @Override public void addPages() { List<String> filterList = null; if (tokenWizardId != null) { filterList = new LinkedList<String>(); filterList.add(tokenWizardId); } ExtPointWizardSelectionListPage page = new ExtPointWizardSelectionListPage(WIZARD_PAGE_NAME, Extensions.AUTH_TOKEN_UI_POINT, filterList, forceWizardId, Messages.getString("UIAuthTokenProvider.wizard_first_page_title"), //$NON-NLS-1$ Messages.getString("UIAuthTokenProvider.wizard_first_page_description"), //$NON-NLS-1$ Messages.getString("UIAuthTokenProvider.noTokenCreator")); //$NON-NLS-1$ // page.setPreselectedId( tokenWizardId, true ); page.setInitData(description); page.setCheatSheetManager(cheatSheetManager); addPage(page); } }; wizard.setNeedsProgressMonitor(true); wizard.setForcePreviousAndNextButtons(true); wizard.setWindowTitle(Messages.getString("UIAuthTokenProvider.wizard_title")); //$NON-NLS-1$ wizard.setDefaultPageImageDescriptor(ImageDescriptor.createFromURL(imgUrl)); WizardDialog dialog = new WizardDialog(this.shell, wizard); return dialog.open() == Window.OK; }
From source file:eu.geclipse.ui.internal.preference.VoPreferencePage.java
License:Open Source License
/** * Trigger the new VO wizard to pop up in order to create a new VO if vo * parameter is null or edit existing vo if vo parameter is specified. * //from ww w . j a v a 2 s . c om * @param vo To {@link IVirtualOrganization} to be edited. */ protected void editVO(final IVirtualOrganization vo) { URL imgUrl = Activator.getDefault().getBundle().getEntry("icons/wizban/vo_wiz.gif"); //$NON-NLS-1$ Wizard wizard = new Wizard() { @Override public void addPages() { ExtPointWizardSelectionListPage page = new ExtPointWizardSelectionListPage("pagename", //$NON-NLS-1$ "eu.geclipse.ui.newVoWizards", //$NON-NLS-1$ Messages.getString("VoPreferencePage.create_new_vo"), //$NON-NLS-1$ Messages.getString("VoPreferencePage.create_new_vo_long"), //$NON-NLS-1$ Messages.getString("VoPreferencePage.no_vo_providers")); //$NON-NLS-1$ page.setInitData(vo); if (vo != null) { page.setPreselectedId(vo.getWizardId(), true); } addPage(page); } @Override public boolean performFinish() { return false; } }; wizard.setForcePreviousAndNextButtons(true); wizard.setNeedsProgressMonitor(true); wizard.setWindowTitle(Messages.getString("VoPreferencePage.create_new_vo")); //$NON-NLS-1$ wizard.setDefaultPageImageDescriptor(ImageDescriptor.createFromURL(imgUrl)); WizardDialog dialog = new WizardDialog(this.getShell(), wizard); dialog.open(); /* * If no VOs were present before calling the wizard, there is now a default * VO to mark as checked. */ checkDefaultVo(); }
From source file:org.eclipse.jface.snippets.wizard.Snippet071WizardWithProgressAndCancel.java
License:Open Source License
private static void openWizard(final Shell pShell) { Wizard testWizard = new MyWizard(10); testWizard.setNeedsProgressMonitor(true); WizardDialog dialog = new WizardDialog(pShell, testWizard); dialog.open();/*from w w w. j a v a2 s . co m*/ pShell.dispose(); }
From source file:org.eclipse.jface.snippets.wizard.Snippet072WizardWithProgressSubtasksAndCancel.java
License:Open Source License
private static void openWizard(final Shell pShell) { Wizard testWizard = new MyWizard(10, 50); testWizard.setNeedsProgressMonitor(true); WizardDialog dialog = new WizardDialog(pShell, testWizard); dialog.open();//from ww w. j a v a2 s.com pShell.dispose(); }
From source file:org.jboss.tools.openshift.internal.ui.wizard.deployimage.ServicePortDialog.java
License:Open Source License
/** * Opens this dialog.//from w w w . ja va 2s .c o m * * @return the return code, ie, the value of the button that the user * clicked to close the dialog. */ public int open() { final IWizardPage page = this; Wizard wizard = new Wizard() { @Override public boolean performFinish() { return true; } @Override public void addPages() { addPage(page); } }; wizard.setNeedsProgressMonitor(true); wizard.setWindowTitle("Service Ports"); this.setWizard(wizard); OkCancelButtonWizardDialog dialog = new OkCancelButtonWizardDialog(getShell(), wizard); return dialog.open(); }