当前位置: 首页>>代码示例>>Java>>正文


Java IWizard类代码示例

本文整理汇总了Java中org.eclipse.jface.wizard.IWizard的典型用法代码示例。如果您正苦于以下问题:Java IWizard类的具体用法?Java IWizard怎么用?Java IWizard使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IWizard类属于org.eclipse.jface.wizard包,在下文中一共展示了IWizard类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getWizard

import org.eclipse.jface.wizard.IWizard; //导入依赖的package包/类
@Override
public IWizard getWizard() {
	SetupWizard wizard = (SetupWizard) super.getWizard();

	wizard.postRegisterState(this.getClass().getSimpleName().toLowerCase());

	StringBuffer summary = new StringBuffer();
	
	for (IWizardPage page : wizard.getPages()) {
		if (page instanceof SummaryGenerator) {
			summary.append(((SummaryGenerator) page).getSummary() + "\n");
		}
	}
	
	summaryText.setText(summary.toString());
	
	setPageComplete(true);
	return wizard;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:20,代码来源:SummaryPage.java

示例2: getWizard

import org.eclipse.jface.wizard.IWizard; //导入依赖的package包/类
@Override
public IWizard getWizard() {
	IWizardPage previousPage = getPreviousPage();
	
	setErrorMessage(null);
	setMessage(getDescription());

	SetupWizard wizard = (SetupWizard) super.getWizard();
	wizard.postRegisterState(this.getClass().getSimpleName().toLowerCase());

	if (previousPage instanceof RegistrationPage) {
		RegistrationPage registrationPage = (RegistrationPage) previousPage;
		if (registrationPage.isConnected()) {
			if (registrationPage.register(this)) {
				infoLink.setText("Online registration in progress, please wait…");
			}
		} else {
			infoLink.setText("Studio offline. Please register manually on " + RegistrationPage.registrationLink + " and paste your PSC here.");
			setErrorMessage("Studio offline! Check your proxy settings");
		}
	} else {
		infoLink.setText("Please paste your previous PSC here and click the 'Next >' button...");
	}
	infoLink.getParent().layout();
	return super.getWizard();
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:27,代码来源:PscKeyPage.java

示例3: execute

import org.eclipse.jface.wizard.IWizard; //导入依赖的package包/类
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
	IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(ID);
	if (descriptor == null) {
		descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(ID);
	}
	if (descriptor == null) {
		descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(ID);
	}
	try {
		if (descriptor != null) {
			IWizard wizard = descriptor.createWizard();
			WizardDialog wd = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
			wd.setTitle(wizard.getWindowTitle());
			wd.open();
		}
	} catch (CoreException e) {
		e.printStackTrace();
	}
	return null;
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:22,代码来源:ServicesWizardCommand.java

示例4: openSubJobSaveDialog

import org.eclipse.jface.wizard.IWizard; //导入依赖的package包/类
/**
 * Open sub graph save dialog.
 * 
 * @return the i file
 */
public IFile openSubJobSaveDialog() {
	IFile iFile = null;
	IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(Messages.JOB_WIZARD_ID);
	if (descriptor != null) {
		IWizard wizard = null;
		try {
			wizard = descriptor.createWizard();
		} catch (CoreException coreException) {
			logger.error("Error while opening create job wizard", coreException);
		}
		WizardDialog wizardDialog = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
		wizardDialog.setTitle(wizard.getWindowTitle());
		wizardDialog.open();
		JobCreationPage jobCreationPage = (JobCreationPage) wizardDialog.getSelectedPage();
		iFile = jobCreationPage.getNewFile();
	}
	return iFile;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:24,代码来源:SubJobUtility.java

示例5: cleanupReservedRoutesIfNotNeeded

import org.eclipse.jface.wizard.IWizard; //导入依赖的package包/类
/**
 * Clean up reserved URLs except those specified in the deployment info,
 * from the context of a wizard
 * 
 * @param workingCopy
 * @param wizard - the wizard
 * @param server - the CloudFoundryServer
 * @param reservedUrls - the list of all reserved route URLS
 */
public static void cleanupReservedRoutesIfNotNeeded(DeploymentInfoWorkingCopy workingCopy, IWizard wizard,
		final CloudFoundryServer server, List<CloudApplicationURL> reservedUrls) {
	List<String> urls = workingCopy.getUris();
	if (urls == null) {
		urls = new ArrayList<String>();
	}
	// Clean up unused routes that were reserved and no longer needed
	for (CloudApplicationURL cloudURL : reservedUrls) {
		boolean isNeeded = false;

		for (String url : urls) {
			if (url.equals(cloudURL.getUrl())) {
				isNeeded = true;
				break;
			}
		}
		if (!isNeeded) {
			deleteRoute(wizard, server, cloudURL);
		}
	}
	reservedUrls.clear();
}
 
开发者ID:eclipse,项目名称:cft,代码行数:32,代码来源:CFUiUtil.java

示例6: openWizard

import org.eclipse.jface.wizard.IWizard; //导入依赖的package包/类
public void openWizard(String id) {
	IWizardDescriptor descriptor = PlatformUI.getWorkbench()
			.getNewWizardRegistry().findWizard(id);
	if (descriptor == null) {
		descriptor = PlatformUI.getWorkbench().getImportWizardRegistry()
				.findWizard(id);
	}
	if (descriptor == null) {
		descriptor = PlatformUI.getWorkbench().getExportWizardRegistry()
				.findWizard(id);
	}
	try {
		if (descriptor != null) {
			IWizard wizard = descriptor.createWizard();
			WizardDialog wd = new WizardDialog(Display.getDefault()
					.getActiveShell(), wizard);
			wd.setTitle(wizard.getWindowTitle());
			wd.open();
		}
	} catch (CoreException e) {
		e.printStackTrace();
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:24,代码来源:OpenExampleIntroAction.java

示例7: handleOptionSelected

import org.eclipse.jface.wizard.IWizard; //导入依赖的package包/类
protected void handleOptionSelected() {
	
	storeSettings();
	comboBoxDatasets.setEnabled(radioButtonUseDataset.getSelection());
	if (radioButtonAddDataset.getSelection()) {
		setSelectedNode(new AWizardNode() {
			public IWizard createWizard() {
				IWizard pwizard = WizardDatasetPage.this.getWizard();
				DatasetWizard w = new DatasetWizard(pwizard, pwizard.getNextPage(WizardDatasetPage.this));
				if (pwizard instanceof JSSWizard)
					w.setConfig( ((JSSWizard) pwizard).getConfig() );
				return w;
			}
		});
		setPageComplete(true);
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:WizardDatasetPage.java

示例8: addPage

import org.eclipse.jface.wizard.IWizard; //导入依赖的package包/类
/**
 * Adds a new page to this wizard. The page is inserted at the end of the page list.
 * 
 * @param page
 *          the new page
 */
public void addPage(IWizardPage page) {
	wizardPages.add(page);
	page.setWizard(this);

	if (page instanceof JSSWizardPage) {
		((JSSWizardPage) page).addChangeListener(this);

		IWizard wiz = this.getParentWizard();
		while (wiz != null && wiz instanceof JSSWizard) {
			JSSWizard parentw = (JSSWizard) wiz;
			((JSSWizardPage) page).addChangeListener(parentw);
			wiz = parentw.getParentWizard();
		}
	}

}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:23,代码来源:JSSWizard.java

示例9: getNextPage

import org.eclipse.jface.wizard.IWizard; //导入依赖的package包/类
/**
 * The <code>WizardSelectionPage</code> implementation of this <code>IWizardPage</code> method returns the first page
 * of the currently selected wizard if there is one.
 */
@Override
public IWizardPage getNextPage() {
	if (selectedNode == null) {
		return super.getNextPage();
	}

	boolean isCreated = selectedNode.isContentCreated();

	IWizard wizard = selectedNode.getWizard();

	if (wizard == null) {
		setSelectedNode(null);
		return null;
	}

	if (!isCreated) {
		// Allow the wizard to create its pages
		wizard.addPages();
	}
	
	IWizardPage nextPage = wizard.getStartingPage();
	
	return nextPage;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:29,代码来源:JSSWizardSelectionPage.java

示例10: getInitialContents

import org.eclipse.jface.wizard.IWizard; //导入依赖的package包/类
protected InputStream getInitialContents()
{
	IWizard wizard = getWizard();
	TemplateSelectionPage templateSelectionPage = (TemplateSelectionPage) wizard
			.getPage(NewFileWizard.TEMPLATE_PAGE_NAME);
	if (wizard.getContainer().getCurrentPage() == templateSelectionPage)
	{
		String templateContent = NewFileWizard.getTemplateContent(templateSelectionPage.getSelectedTemplate(),
				getContainerFullPath().append(getFileName()));
		if (templateContent != null)
		{
			return new ReaderInputStream(new StringReader(templateContent), IOUtil.UTF_8);
		}
	}
	return super.getInitialContents();
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:17,代码来源:WizardNewFilePage.java

示例11: finishPressed

import org.eclipse.jface.wizard.IWizard; //导入依赖的package包/类
/**
 * The Finish button has been pressed.
 */
protected void finishPressed() {
	// Wizards are added to the nested wizards list in setWizard.
	// This means that the current wizard is always the last wizard in the
	// list.
	// Note that we first call the current wizard directly (to give it a
	// chance to
	// abort, do work, and save state) then call the remaining n-1 wizards
	// in the
	// list (to save state).
	if (wizard.performFinish()) {
		// Call perform finish on outer wizards in the nested chain
		// (to allow them to save state for example)
		for (int i = 0; i < nestedWizards.size() - 1; i++) {
			((IWizard) nestedWizards.get(i)).performFinish();
		}
		// Hard close the dialog.
		setReturnCode(OK);
		hardClose();
	}
}
 
开发者ID:MentorEmbedded,项目名称:p2-installer,代码行数:24,代码来源:WizardDialog.java

示例12: hardClose

import org.eclipse.jface.wizard.IWizard; //导入依赖的package包/类
/**
 * Closes this window.
 * 
 * @return <code>true</code> if the window is (or was already) closed, and
 *         <code>false</code> if it is still open
 */
private boolean hardClose() {
	// inform wizards
	for (int i = 0; i < createdWizards.size(); i++) {
		IWizard createdWizard = (IWizard) createdWizards.get(i);
		try {
			createdWizard.dispose();
		} catch (Exception e) {
			Status status = new Status(IStatus.ERROR, Policy.JFACE, IStatus.ERROR, e.getMessage(), e);
			Policy.getLog().log(status);
		}
		// Remove this dialog as a parent from the managed wizard.
		// Note that we do this after calling dispose as the wizard or
		// its pages may need access to the container during
		// dispose code
		createdWizard.setContainer(null);
	}
	// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=202534
	// disposing the wizards could cause the image currently set in
	// this dialog to be disposed.  A subsequent repaint event during
	// close would then fail.  To prevent this case, we null out the image.
	setTitleImage(null);
	return super.close();
}
 
开发者ID:MentorEmbedded,项目名称:p2-installer,代码行数:30,代码来源:WizardDialog.java

示例13: updateSizeForWizard

import org.eclipse.jface.wizard.IWizard; //导入依赖的package包/类
/**
 * Computes the correct dialog size for the given wizard and resizes its shell if necessary.
 * 
 * @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);
	}
}
 
开发者ID:MentorEmbedded,项目名称:p2-installer,代码行数:22,代码来源:WizardDialog.java

示例14: getNextPage

import org.eclipse.jface.wizard.IWizard; //导入依赖的package包/类
public IWizardPage getNextPage()
{
	IWizard wiz = getWizard();
	
	IWizardPage nextPage;
	switch(info.getDatabaseType())
	{
	case DatabaseMeta.TYPE_DATABASE_ORACLE:
		nextPage = wiz.getPage("oracle"); // Oracle //$NON-NLS-1$
		break;
	case DatabaseMeta.TYPE_DATABASE_INFORMIX:
		nextPage = wiz.getPage("ifx"); // Informix //$NON-NLS-1$
		break;
	default: 
		nextPage = wiz.getPage("2"); // page 2 //$NON-NLS-1$
		break;
	}
	
	return nextPage;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:21,代码来源:CreateDatabaseWizardPageJDBC.java

示例15: getNextPage

import org.eclipse.jface.wizard.IWizard; //导入依赖的package包/类
public IWizardPage getNextPage()
{
	IWizard wiz = getWizard();
	
	IWizardPage nextPage;
	if (databaseMeta.getDatabaseInterface() instanceof OracleDatabaseMeta) {
		nextPage = wiz.getPage("oracle"); // Oracle //$NON-NLS-1$
	} else if (databaseMeta.getDatabaseInterface() instanceof InformixDatabaseMeta) {
		nextPage = wiz.getPage("ifx"); // Informix //$NON-NLS-1$
	} else
	{
		nextPage = wiz.getPage("2"); // page 2 //$NON-NLS-1$
	}
	
	return nextPage;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:17,代码来源:CreateDatabaseWizardPageJDBC.java


注:本文中的org.eclipse.jface.wizard.IWizard类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。