List of usage examples for org.eclipse.jface.wizard IWizard getPages
IWizardPage[] getPages();
From source file:com.codesourcery.internal.installer.ui.WizardDialog.java
License:Open Source License
/** * Computes the correct dialog size for the given wizard and resizes its shell if necessary. * //from w w w .ja v a 2s .co m * @param sizingWizard the wizard */ private void updateSizeForWizard(IWizard sizingWizard) { Point delta = new Point(0, 0); IWizardPage[] pages = sizingWizard.getPages(); for (int i = 0; i < pages.length; i++) { // ensure the page container is large enough Point pageDelta = calculatePageSizeDelta(pages[i]); delta.x = Math.max(delta.x, pageDelta.x); delta.y = Math.max(delta.y, pageDelta.y); } if (delta.x > 0 || delta.y > 0) { // increase the size of the shell Shell shell = getShell(); Point shellSize = shell.getSize(); setShellSize(shellSize.x + delta.x, shellSize.y + delta.y); } }
From source file:gov.redhawk.ide.spd.ui.wizard.NewScaResourceWizard.java
License:Open Source License
/** * Provides the index of the given wizard page. * @param page The page who's index you are looking for * @return/* w w w . j a v a 2 s .c o m*/ */ private int getWizardPageIndex(IWizardPage page) { IWizard pageWizard = page.getWizard(); IWizardPage[] allPages = pageWizard.getPages(); List<IWizardPage> arrayOfPages = Arrays.asList(allPages); return arrayOfPages.indexOf(page); }
From source file:ilg.gnumcueclipse.managedbuild.cross.arm.ui.SetCrossCommandWizardPage.java
License:Open Source License
public static String getProjectName(IWizard wizard) { IWizardPage[] pages = wizard.getPages(); for (IWizardPage wizardPage : pages) { if (wizardPage instanceof WizardNewProjectCreationPage) { return ((WizardNewProjectCreationPage) wizardPage).getProjectName(); }//from www .j a va2 s . co m } return null; }
From source file:org.eclipse.mylyn.internal.tasks.ui.wizards.QueryWizardDialog.java
License:Open Source License
public QueryWizardDialog(Shell parentShell, IWizard newWizard) { super(parentShell, newWizard); setHelpAvailable(false);/*from w w w . j av a 2 s. co m*/ for (IWizardPage page : newWizard.getPages()) { if (page instanceof AbstractRepositoryQueryPage2) { abstractRepositoryQueryPage = (AbstractRepositoryQueryPage2) page; } } }
From source file:org.eclipse.recommenders.internal.snipmatch.rcp.SnippetRepositoryTypeSelectionWizard.java
License:Open Source License
public void updateSelectedWizard(IWizard wizard) { ISnippetRepositoryWizard cast = Checks.cast(wizard); if (wizard != null) { for (IWizardPage page : wizard.getPages()) { addPage(page);//from w ww .j a v a 2s. c om } } selectedWizard = cast; }
From source file:org.eclipse.wst.xml.ui.internal.wizards.ExampleProjectCreationWizardPage.java
License:Open Source License
/** * @see org.eclipse.ui.dialogs.WizardNewProjectCreationPage#validatePage() *///from w ww . ja v a 2 s . co m protected boolean validatePage() { if (!super.validatePage()) { return false; } String projectName = getProjectName(); if (projectName == null) { return false; } IWizard wizard = getWizard(); if (wizard instanceof ExampleProjectCreationWizard) { IWizardPage[] pages = wizard.getPages(); for (int i = 0; i < pages.length; i++) { if ((pages[i] != this) && (pages[i] instanceof ExampleProjectCreationWizardPage)) { if (projectName.equals(((ExampleProjectCreationWizardPage) pages[i]).getProjectName())) { setErrorMessage(XMLWizardsMessages.ExampleProjectCreationWizardPage_error_alreadyexists); return false; } } } } return true; }
From source file:org.modelio.api.ui.ModelioWizardDialog.java
License:Apache License
/** * Computes the correct dialog size for the given wizard and resizes its shell if necessary. * @param sizingWizard the wizard//from w w w. j av a2s . c o m */ @objid("bc240c94-120f-11e2-b5c6-002564c97630") private void updateSizeForWizard(final IWizard sizingWizard) { Point delta = new Point(0, 0); IWizardPage[] pages = sizingWizard.getPages(); for (int i = 0; i < pages.length; i++) { // ensure the page container is large enough Point pageDelta = calculatePageSizeDelta(pages[i]); delta.x = Math.max(delta.x, pageDelta.x); delta.y = Math.max(delta.y, pageDelta.y); } if (delta.x > 0 || delta.y > 0) { // increase the size of the shell Shell shell = getShell(); Point shellSize = shell.getSize(); setShellSize(shellSize.x + delta.x, shellSize.y + delta.y); } }
From source file:uk.ac.diamond.scisoft.ncd.rcp.wizards.AbstractNcdDataReductionPage.java
License:Apache License
@Override public IWizardPage getNextPage() { IWizard wizard = getWizard(); IWizardPage[] pages = wizard.getPages(); if (currentPageNumber == 0) { return super.getNextPage(); }// ww w. j a va 2 s . co m for (int i = currentPageNumber; i < pages.length; i++) { if (i < (pages.length - 1) && activePages.get(i + 1)) { return pages[i + 1]; } } return null; }
From source file:uk.ac.diamond.scisoft.ncd.rcp.wizards.NcdDataReductionSetupPage.java
License:Apache License
@Override public IWizardPage getNextPage() { IWizard wizard = getWizard(); IWizardPage[] pages = wizard.getPages(); for (int i = currentPageNumber; i < pages.length; i++) { if (activePages.get(i)) { return pages[i]; }//from ww w. java2 s .com } return null; }