本文整理汇总了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();
}
示例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;
}