List of usage examples for org.eclipse.jface.wizard Wizard setForcePreviousAndNextButtons
public void setForcePreviousAndNextButtons(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 w w . j a va 2 s . c o 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.gvid.internal.views.NewGVidDropDownAction.java
License:Open Source License
@Override public void run() { URL imgUrl = Activator.getDefault().getBundle().getEntry("icons/wizban/newconn_wiz.gif"); //$NON-NLS-1$ Wizard wizard = new Wizard() { @Override/*from ww w .j a v a 2 s .c o m*/ public boolean performFinish() { return false; } @Override public void addPages() { ExtPointWizardSelectionListPage page = new ExtPointWizardSelectionListPage( Messages.getString("NewGVidDropDownAction.selectConnectionType"), //$NON-NLS-1$ EXT_ID_NEW_GVID_WIZARD, Messages.getString("NewGVidDropDownAction.title"), //$NON-NLS-1$ Messages.getString("NewGVidDropDownAction.description"), //$NON-NLS-1$ Messages.getString("NewGVidDropDownAction.noConnectionTypes")); //$NON-NLS-1$ page.setInitData(NewGVidDropDownAction.this.gvidView); addPage(page); } }; wizard.setForcePreviousAndNextButtons(true); wizard.setDefaultPageImageDescriptor(ImageDescriptor.createFromURL(imgUrl)); wizard.setWindowTitle(Messages.getString("NewGVidDropDownAction.newGVidSession")); //$NON-NLS-1$ WizardDialog wizardDialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard); wizardDialog.open(); }
From source file:eu.geclipse.terminal.internal.NewTerminalDropDownAction.java
License:Open Source License
@Override public void run() { URL imgUrl = Activator.getDefault().getBundle().getEntry("icons/wizban/newconn_wiz.gif"); //$NON-NLS-1$ Wizard wizard = new Wizard() { @Override//from ww w.ja v a 2 s . c o m public boolean performFinish() { return false; } @Override public void addPages() { ExtPointWizardSelectionListPage page = new ExtPointWizardSelectionListPage( Messages.getString("NewTerminalDropDownAction.selectConnectionType"), //$NON-NLS-1$ EXT_ID_NEW_TERMINAL_WIZARD, Messages.getString("NewTerminalDropDownAction.title"), //$NON-NLS-1$ Messages.getString("NewTerminalDropDownAction.description"), //$NON-NLS-1$ Messages.getString("NewTerminalDropDownAction.noConnectionTypes")); //$NON-NLS-1$ page.setInitData(NewTerminalDropDownAction.this.terminalView); addPage(page); } }; wizard.setForcePreviousAndNextButtons(true); wizard.setDefaultPageImageDescriptor(ImageDescriptor.createFromURL(imgUrl)); wizard.setWindowTitle(Messages.getString("NewTerminalDropDownAction.newTerminalSession")); //$NON-NLS-1$ WizardDialog wizardDialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard); wizardDialog.open(); }
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. * /* ww w. j a v a2s . 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.gmf.examples.mindmap.rcp.part.MindmapInitDiagramFileAction.java
License:Open Source License
/** * @generated// w ww . j a v a 2s . c o m */ public void run(IAction action) { EObject diagramRoot = null; TransactionalEditingDomain editingDomain = WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain(); if (mySelectedModelFileURI != null) { ResourceSet resourceSet = new ResourceSetImpl(); try { Resource resource = resourceSet.getResource(mySelectedModelFileURI, true); diagramRoot = (EObject) resource.getContents().get(0); } catch (WrappedException ex) { MindmapDiagramEditorPlugin.getInstance() .logError("Unable to load resource: " + mySelectedModelFileURI.toString(), ex); //$NON-NLS-1$ MessageDialog.openError(getWindow().getShell(), Messages.MindmapInitDiagramFileAction_ResourceErrorDialogTitle, Messages.MindmapInitDiagramFileAction_ResourceErrorDialogMessage); return; } } Wizard wizard = new MindmapNewDiagramFileWizard(mySelectedModelFileURI, diagramRoot, editingDomain); IDialogSettings pluginDialogSettings = MindmapDiagramEditorPlugin.getInstance().getDialogSettings(); IDialogSettings initDiagramFileSettings = pluginDialogSettings.getSection("InitDiagramFile"); //$NON-NLS-1$ if (initDiagramFileSettings == null) { initDiagramFileSettings = pluginDialogSettings.addNewSection("InitDiagramFile"); //$NON-NLS-1$ } wizard.setDialogSettings(initDiagramFileSettings); wizard.setForcePreviousAndNextButtons(mySelectedModelFileURI != null); wizard.setWindowTitle(NLS.bind(Messages.MindmapInitDiagramFileAction_WizardTitle, MapEditPart.MODEL_ID)); WizardDialog dialog = new WizardDialog(getWindow().getShell(), wizard); dialog.create(); dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500); dialog.open(); }
From source file:org.eclipse.gmf.map.editor.part.GMFMapInitDiagramFileAction.java
License:Open Source License
/** * @generated/*from w w w. ja v a2 s .co m*/ */ public void run(IAction action) { TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain(); ResourceSet resourceSet = editingDomain.getResourceSet(); EObject diagramRoot = null; try { Resource resource = resourceSet .getResource(URI.createPlatformResourceURI(mySelectedModelFile.getFullPath().toString()), true); diagramRoot = (EObject) resource.getContents().get(0); } catch (WrappedException ex) { GMFMapDiagramEditorPlugin.getInstance() .logError("Unable to load resource: " + mySelectedModelFile.getFullPath().toString(), ex); //$NON-NLS-1$ } if (diagramRoot == null) { MessageDialog.openError(myPart.getSite().getShell(), "Error", "Model file loading failed"); return; } Wizard wizard = new GMFMapNewDiagramFileWizard(mySelectedModelFile, myPart.getSite().getPage(), mySelection, diagramRoot, editingDomain); IDialogSettings pluginDialogSettings = GMFMapDiagramEditorPlugin.getInstance().getDialogSettings(); IDialogSettings initDiagramFileSettings = pluginDialogSettings.getSection("InisDiagramFile"); //$NON-NLS-1$ if (initDiagramFileSettings == null) { initDiagramFileSettings = pluginDialogSettings.addNewSection("InisDiagramFile"); //$NON-NLS-1$ } wizard.setDialogSettings(initDiagramFileSettings); wizard.setForcePreviousAndNextButtons(false); wizard.setWindowTitle("Initialize new " + MappingEditPart.MODEL_ID + " diagram file"); WizardDialog dialog = new WizardDialog(myPart.getSite().getShell(), wizard); dialog.create(); dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500); dialog.open(); }
From source file:org.eclipse.stp.bpmn.diagram.part.BpmnInitDiagramFileAction.java
License:Open Source License
/** * @generated//ww w .j a v a 2 s.com */ public void run(IAction action) { TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain(); ResourceSet resourceSet = editingDomain.getResourceSet(); EObject diagramRoot = null; try { Resource resource = resourceSet .getResource(URI.createPlatformResourceURI(mySelectedModelFile.getFullPath().toString()), true); diagramRoot = (EObject) resource.getContents().get(0); } catch (WrappedException ex) { BpmnDiagramEditorPlugin.getInstance() .logError("Unable to load resource: " + mySelectedModelFile.getFullPath().toString(), ex); //$NON-NLS-1$ } if (diagramRoot == null) { MessageDialog.openError(myPart.getSite().getShell(), "Error", //$NON-NLS-1$ BpmnDiagramMessages.BpmnInitDiagramFileAction_model_loading_failed); return; } Wizard wizard = new BpmnNewDiagramFileWizard(mySelectedModelFile, myPart.getSite().getPage(), mySelection, diagramRoot, editingDomain); IDialogSettings pluginDialogSettings = BpmnDiagramEditorPlugin.getInstance().getDialogSettings(); IDialogSettings initDiagramFileSettings = pluginDialogSettings.getSection("InisDiagramFile"); //$NON-NLS-1$ if (initDiagramFileSettings == null) { initDiagramFileSettings = pluginDialogSettings.addNewSection("InisDiagramFile"); //$NON-NLS-1$ } wizard.setDialogSettings(initDiagramFileSettings); wizard.setForcePreviousAndNextButtons(false); wizard.setWindowTitle(BpmnDiagramMessages.bind(BpmnDiagramMessages.BpmnInitDiagramFileAction_title, BpmnDiagramEditPart.MODEL_ID)); WizardDialog dialog = new WizardDialog(myPart.getSite().getShell(), wizard); dialog.create(); dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500); dialog.open(); }
From source file:org.talend.dataprofiler.core.ui.action.AbstractPredefinedAnalysisAction.java
License:Open Source License
protected WizardDialog getStandardAnalysisWizardDialog(AnalysisType type, AnalysisParameter parameter) { Wizard wizard = WizardFactory.createAnalysisWizard(type, parameter); wizard.setForcePreviousAndNextButtons(true); WizardDialog dialog = new WizardDialog(null, wizard); dialog.setPageSize(500, 340);/* w w w . j av a2s . co m*/ return dialog; }
From source file:org.talend.dataprofiler.core.ui.action.actions.AnalyzeColumnAction.java
License:Open Source License
private int openStandardAnalysisDialog(AnalysisType type) { // MOD klliu 2011-02-16 Modify this action for distincting CreateNewAnalysisAction feature 15387 IRepositoryNode firstElement = (RepositoryNode) this.selection.getFirstElement(); IRepositoryViewObject viewObject = firstElement.getObject(); Item item = viewObject.getProperty().getItem(); ConnectionItem connectionItem = (ConnectionItem) item; Connection connection = connectionItem.getConnection(); IRepositoryNode repositoryNode = RepositoryNodeHelper.recursiveFind(connection); AnalysisParameter parameter = new AnalysisParameter(); parameter.setConnectionRepNode(repositoryNode); Wizard wizard = WizardFactory.createAnalysisWizard(type, parameter); wizard.setForcePreviousAndNextButtons(true); WizardDialog dialog = new WizardDialog(null, wizard); dialog.setPageSize(500, 340);/*from ww w . j av a 2s . com*/ return dialog.open(); }
From source file:org.talend.dataprofiler.core.ui.action.actions.AnalyzeColumnCorrelationAction.java
License:Open Source License
private int openStandardAnalysisDialog(AnalysisType type) { AnalysisLabelParameter parameter = new AnalysisLabelParameter(); checkSelectedColumn();/*from w ww .j av a 2 s.c o m*/ if (hasNumberColumn && hasDateColumn) { MessageUI.openError(DefaultMessagesImpl.getString("AnalyzeColumnCorrelationAction.InvalidOperation")); //$NON-NLS-1$ return Window.CANCEL; } else if (hasNumberColumn && !hasDateColumn) { parameter.setCategoryLabel(AnalysisLabelParameter.NUMBERIC_CORRELATION); } else if (!hasNumberColumn && hasDateColumn) { parameter.setCategoryLabel(AnalysisLabelParameter.DATE_CORRELATION); } else { parameter.setCategoryLabel(AnalysisLabelParameter.NOMINAL_CORRELATION); } Wizard wizard = WizardFactory.createAnalysisWizard(type, parameter); wizard.setForcePreviousAndNextButtons(true); WizardDialog dialog = new WizardDialog(null, wizard); dialog.setPageSize(500, 340); return dialog.open(); }