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


Java WizardPage.setPageComplete方法代碼示例

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


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

示例1: flagErrorMessage

import org.eclipse.jface.wizard.WizardPage; //導入方法依賴的package包/類
/**
 * Locates the page that this option is presented in and flags that the
 * option is required and is currently not set. The flagging is done by
 * setting the page incomplete and setting the error message that uses
 * option's message label.
 *
 * @param option
 *            the option that is required and currently not set
 */
protected void flagErrorMessage ( final TemplateOption option, final String newMessage, final int newType )
{
    for ( int i = 0; i < getPageCount (); i++ )
    {
        final WizardPage page = getPage ( i );
        for ( final TemplateOption pageOption : getOptions ( i ) )
        {
            if ( pageOption.equals ( option ) )
            {
                page.setPageComplete ( false );
                page.setMessage ( newMessage, newType );
            }
        }
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:25,代碼來源:BaseTemplate.java

示例2: flagMissingRequiredOption

import org.eclipse.jface.wizard.WizardPage; //導入方法依賴的package包/類
/**
 * Locates the page that this option is presented in and flags that the
 * option is required and is currently not set. The flagging is done by
 * setting the page incomplete and setting the error message that uses
 * option's message label.
 * 
 * @param option
 *            the option that is required and currently not set
 */
protected void flagMissingRequiredOption(TemplateOption option) {
	WizardPage page = null;
	for (int i = 0; i < pages.size(); i++) {
		TemplatePage tpage = pages.get(i);
		ArrayList<TemplateOption> list = tpage.options;
		if (list.contains(option)) {
			page = tpage.page;
			break;
		}
	}
	if (page != null) {
		page.setPageComplete(false);
		String message = NLS.bind(PDEUIMessages.OptionTemplateSection_mustBeSet, option.getMessageLabel());
		page.setErrorMessage(message);
	}
}
 
開發者ID:eclipse,項目名稱:gemoc-studio,代碼行數:26,代碼來源:OptionTemplateSection.java

示例3: flagErrorOnOption

import org.eclipse.jface.wizard.WizardPage; //導入方法依賴的package包/類
/**
 * Locates the page that this option is presented in and flags that the
 * option has an error. The flagging is done by
 * setting the page incomplete and setting the error message with the 
 * provided message prefixed by the option's message label.
 * 
 * @param option
 *            the option that is required and currently not set
 * @param msg
 *            the message indicating the error for the given option
 */
protected void flagErrorOnOption(TemplateOption option, String msg) {
	WizardPage page = null;
	for (int i = 0; i < pages.size(); i++) {
		TemplatePage tpage = pages.get(i);
		ArrayList<TemplateOption> list = tpage.options;
		if (list.contains(option)) {
			page = tpage.page;
			break;
		}
	}
	if (page != null) {
		page.setPageComplete(false);
		String message = option.getMessageLabel()+": "+msg;
		page.setErrorMessage(message);
	}
}
 
開發者ID:eclipse,項目名稱:gemoc-studio,代碼行數:28,代碼來源:OptionTemplateSection.java

示例4: resetPageState

import org.eclipse.jface.wizard.WizardPage; //導入方法依賴的package包/類
/**
 * Resets the current page state by clearing the error message and making
 * the page complete, thereby allowing users to flip to the next page.
 */
protected void resetPageState() {
	if (pages.size() == 0)
		return;
	WizardPage firstPage = pages.get(0).page;
	IWizardContainer container = firstPage.getWizard().getContainer();
	WizardPage currentPage = (WizardPage) container.getCurrentPage();
	currentPage.setErrorMessage(null);
	currentPage.setPageComplete(true);
}
 
開發者ID:eclipse,項目名稱:gemoc-studio,代碼行數:14,代碼來源:OptionTemplateSection.java

示例5: validateOptions

import org.eclipse.jface.wizard.WizardPage; //導入方法依賴的package包/類
@Override
public void validateOptions(TemplateOption changed) {
	WizardPage page = getPage(0);

	for (TemplateOption option : options.keySet()) {
		if (option.isRequired() && option.isEmpty()) {
			page.setPageComplete(false);
			page.setErrorMessage("Required information is missing");
			return;
		}
	}

	page.setPageComplete(true);
	page.setErrorMessage(null);
}
 
開發者ID:secondfiddle,項目名稱:pep-tools,代碼行數:16,代碼來源:ProjectTemplateSection.java


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