當前位置: 首頁>>代碼示例>>Java>>正文


Java IWizard.setContainer方法代碼示例

本文整理匯總了Java中org.eclipse.jface.wizard.IWizard.setContainer方法的典型用法代碼示例。如果您正苦於以下問題:Java IWizard.setContainer方法的具體用法?Java IWizard.setContainer怎麽用?Java IWizard.setContainer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jface.wizard.IWizard的用法示例。


在下文中一共展示了IWizard.setContainer方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: 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

示例2: performFinish

import org.eclipse.jface.wizard.IWizard; //導入方法依賴的package包/類
@Override
public boolean performFinish() {
    // if we're finishing from the main page then perform finish on the
    // selected wizard.
    if (getContainer().getCurrentPage() == mainPage) {
        if (mainPage.canFinishEarly()) {
            final IWizard wizard = mainPage.getSelectedNode().getWizard();
            wizard.setContainer(getContainer());
            return wizard.performFinish();
        }
    }
    return true;
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:14,代碼來源:CreateBuildConfigurationWizard.java


注:本文中的org.eclipse.jface.wizard.IWizard.setContainer方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。