List of usage examples for org.eclipse.jface.wizard WizardDialog addPageChangingListener
public void addPageChangingListener(IPageChangingListener listener)
From source file:com.codenvy.eclipse.ui.wizard.exporter.ExportProjectToCodenvyWizard.java
License:Open Source License
@Override public void setContainer(IWizardContainer wizardContainer) { super.setContainer(wizardContainer); if (wizardContainer != null) { final WizardDialog wizardDialog = (WizardDialog) wizardContainer; wizardDialog.addPageChangingListener(authenticationWizardPage); wizardDialog.addPageChangedListener(workspaceWizardPage); }// www .j a va 2s. co m }
From source file:com.codenvy.eclipse.ui.wizard.importer.ImportProjectFromCodenvyWizard.java
License:Open Source License
@Override public void setContainer(IWizardContainer wizardContainer) { super.setContainer(wizardContainer); if (wizardContainer != null) { final WizardDialog wizardDialog = (WizardDialog) wizardContainer; wizardDialog.addPageChangingListener(authenticationWizardPage); wizardDialog.addPageChangedListener(projectWizardPage); }/*from w ww . j a va 2 s . c o m*/ }
From source file:com.google.gdt.eclipse.gph.wizards.AbstractWizardPage.java
License:Open Source License
public final void createControl(Composite parent) { Control contents = createPageContents(parent); setControl(contents);/*from w w w .j a v a 2s. co m*/ IWizardContainer container = getWizard().getContainer(); if (container instanceof WizardDialog) { WizardDialog dialog = (WizardDialog) container; dialog.addPageChangingListener(new IPageChangingListener() { public void handlePageChanging(PageChangingEvent event) { if (event.getCurrentPage() == AbstractWizardPage.this && event.getTargetPage() != getPreviousPage()) { if (!exitingPage()) { event.doit = false; } } } }); } }
From source file:com.google.gdt.eclipse.managedapis.ui.ApiImportWizard.java
License:Open Source License
@Override public void addPages() { if (getContainer() instanceof WizardDialog) { WizardDialog dialog = (WizardDialog) getContainer(); dialog.addPageChangingListener(new IPageChangingListener() { public void handlePageChanging(PageChangingEvent event) { if (event.getCurrentPage() == projectSelectionPage && event.getTargetPage() == apiListingPage) { event.doit = updateFromProjectSelectionPage(); }//from w ww . j ava 2 s .c o m } }); } ImageDescriptor wizardIcon = null; try { wizardIcon = resources.getManagedApiImportIcon(); } catch (MalformedURLException e) { ManagedApiLogger.warn("Unable to load Managed Api icon due to malformed URL"); } // Add a project selection page. if (project == null) { projectSelectionPage = new ProjectSelectionPage(this, wizardIcon); addPage(projectSelectionPage); } // Add the API listings page. apiListingPage = new ApiListingPage("GoogleApiPage", managedApiListingSourceFactory); apiListingPage.setImageDescriptor(wizardIcon); apiListingPage.setResources(resources); addPage(apiListingPage); }
From source file:com.ibm.xsp.extlib.designer.bluemix.wizard.ConfigBluemixWizard.java
License:Open Source License
static public void launch() { // Check there's an open project if (ToolbarAction.project != null) { // Check that the Server details are configured if (BluemixUtil.isServerConfigured()) { // Check is the manifest open ManifestMultiPageEditor editor = BluemixUtil.getManifestEditor(ToolbarAction.project); if (editor != null) { MessageDialog.openWarning(null, _WIZARD_TITLE, "The Manifest for this application is open. You must close the Manifest before running the Configuration Wizard."); // $NLX-ConfigBluemixWizard.TheManifestforthisapplicat-1$ } else { // Launch the Bluemix Config Wizard ConfigBluemixWizard wiz = new ConfigBluemixWizard(); WizardDialog dialog = new WizardDialog(null, wiz); dialog.addPageChangingListener(wiz); dialog.open();/*from w ww . j a v a 2 s. com*/ } } else { BluemixUtil.displayConfigureServerDialog(); } } else { MessageDialog.openError(null, _WIZARD_TITLE, "No application has been selected or the selected application is not open."); // $NLX-ConfigBluemixWizard.Noapplicationhasbeenselectedorthe-1$ } }
From source file:com.ibm.xsp.extlib.designer.bluemix.wizard.HybridBluemixWizard.java
License:Open Source License
static public int launch(HybridProfile profile, boolean newProfile) { // Launch Hybrid Wizard HybridBluemixWizard wiz = new HybridBluemixWizard(profile, newProfile); WizardDialog dialog = new WizardDialog(null, wiz); dialog.addPageChangingListener(wiz); return dialog.open(); }
From source file:com.ibm.xsp.extlib.designer.bluemix.wizard.ImportBluemixWizard.java
License:Open Source License
static public void launch() { if (BluemixUtil.isServerConfigured()) { // Launch the Bluemix Config Wizard ImportBluemixWizard wiz = new ImportBluemixWizard(); WizardDialog dialog = new WizardDialog(null, wiz); dialog.addPageChangingListener(wiz); dialog.open();/*from w w w . j a va 2 s .c o m*/ } else { BluemixUtil.displayConfigureServerDialog(); } }
From source file:com.ibm.xsp.extlib.designer.tooling.palette.applicationlayout.ApplicationLayoutDropAction.java
License:Open Source License
private Element openConfigurationDialog(Document doc, String prefix) { // Create the AppLication Layout element Element element = super.createElement(doc, prefix); // Setup the panel data PanelExtraData panelData = new PanelExtraData(); panelData.setDesignerProject(getDesignerProject()); panelData.setNode(element);/*from w w w .j a v a 2 s . c om*/ // Must do the following or the property editor does not function properly panelData.setWorkbenchPart( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor()); panelData.setHostWorkbenchPart( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor()); // Launch the Wizard Shell shell = getControl().getShell(); ApplicationLayoutDropWizard wiz = new ApplicationLayoutDropWizard(shell, panelData); WizardDialog dialog = new WizardDialog(shell, wiz); dialog.addPageChangingListener(wiz); if (Dialog.OK != dialog.open()) { return null; } return element; }
From source file:com.ibm.xsp.extlib.designer.tooling.palette.calendarview.CalendarViewDropAction.java
License:Open Source License
private Element openConfigurationWizard(Document doc, String prefix) { // We must create an element for the panelData // We might overwrite this depending on chosen wizard options Element element = super.createElement(doc, prefix); // Setup the Panel Data PanelExtraData panelData = new PanelExtraData(); panelData.setDesignerProject(getDesignerProject()); panelData.setNode(element);//from w w w . j a va 2 s. c o m panelData.setDocument(doc); // Launch the Wizard Shell shell = getControl().getShell(); CalendarViewDropWizard wiz = new CalendarViewDropWizard(shell, panelData); WizardDialog dialog = new WizardDialog(shell, wiz); dialog.addPageChangingListener(wiz); dialog.addPageChangedListener(wiz); if (WizardDialog.OK != dialog.open()) { return null; } // Return the calendarView or panel return (Element) panelData.getNode(); }
From source file:com.ibm.xsp.extlib.designer.tooling.palette.singlepageapp.SinglePageAppDropAction.java
License:Open Source License
private Element openConfigurationWizard(Document doc, String prefix) { Shell shell = getControl().getShell(); // Setup the Panel Data Element element = super.createElement(doc, prefix); PanelExtraData panelData = new PanelExtraData(); panelData.setDesignerProject(getDesignerProject()); panelData.setNode(element);//ww w . j a v a 2 s .c o m // Check that the mobile prefix has been configured // and that the XPage has the correct prefix if (checkXPagePrefix(panelData) == false) { return null; } // Launch the Wizard SinglePageAppDropWizard wiz = new SinglePageAppDropWizard(shell, panelData); WizardDialog dialog = new WizardDialog(shell, wiz); dialog.addPageChangingListener(wiz); dialog.addPageChangedListener(wiz); if (WizardDialog.OK != dialog.open()) { return null; } return element; }