本文整理匯總了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;
}