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


Java TableItem.getChecked方法代碼示例

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


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

示例1: createConvertor

import org.eclipse.swt.widgets.TableItem; //導入方法依賴的package包/類
/**
 * @param context
 * @return
 * @throws CoreException
 */
public OffLinePostConversionImpl createConvertor(ResourceContext context) throws CoreException {
	List<BuildPolicy> selected = new ArrayList<BuildPolicy>();
	TableItem[] items = buildPoliciesViewer.getTable().getItems();
	for (TableItem tableItem : items) {
		if (tableItem.getChecked()) {
			selected.add((BuildPolicy) tableItem.getData());
		}
	}
	BuildPolicy[] policies = new BuildPolicy[selected.size()];
	selected.toArray(policies);
 
	ResourceContext ctx = new ResourceContext(
			context.getContainerFullPath(), 
			gcc.getRoot(), 
			gcc.getPackageFragment(), 
			gcc.getClassName(),
			gcc.getExtendedClassName(),
			context.getSelectedFile(), 
			gcc.getMode(), 
			context.getClassExtension());
	return new OffLinePostConversionImpl(ctx, policies, Integer.parseInt(timeoutText.getText()));
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:28,代碼來源:OfflineGW4ETestUIPage.java

示例2: gatherIgnoredFactories

import org.eclipse.swt.widgets.TableItem; //導入方法依賴的package包/類
protected Set<String> gatherIgnoredFactories ()
{
    final Set<String> result = new HashSet<String> ();
    for ( final TableItem item : this.factoriesViewer.getTable ().getItems () )
    {
        if ( item.getChecked () )
        {
            final String data = (String)item.getData ();
            result.add ( data );
        }
    }
    return result;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:14,代碼來源:IgnorePage.java

示例3: validate

import org.eclipse.swt.widgets.TableItem; //導入方法依賴的package包/類
public String validate() {
	TableItem[] items = tableViewer.getTable().getItems();
	for (int i = 0; i < items.length; i++) {
		TableItem ti = items[i];
		if (ti.getChecked()) {
			ModelData data = (ModelData) ti.getData();
			return data.validatePolicy();
		}
	}
	return null;
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:12,代碼來源:ModelPathGenerator.java

示例4: highlightNodesOnGraph

import org.eclipse.swt.widgets.TableItem; //導入方法依賴的package包/類
private void highlightNodesOnGraph(boolean selection) {
	TableItem[] selectedNodes = viewer.getTable().getItems();
	List<VFNode> nodesToFilter = new ArrayList<>();
	for (TableItem tableItem : selectedNodes) {
		if (tableItem.getChecked())
			nodesToFilter.add(new VFNode((VFUnit) tableItem.getData(), 0));
	}
	try {
		ServiceUtil.getService(DataModel.class).filterGraph(nodesToFilter, selection, true, null);
	} catch (Exception e) {
		e.printStackTrace();
	}
}
 
開發者ID:VisuFlow,項目名稱:visuflow-plugin,代碼行數:14,代碼來源:ResultView.java

示例5: validatePage

import org.eclipse.swt.widgets.TableItem; //導入方法依賴的package包/類
/**
 * @return
 */
protected boolean validatePage() {
	((ConvertToFileCreationWizard) this.getWizard()).setJunitTestPage(null);
	this.setPageComplete(false);
	this.setErrorMessage(null);
	this.setMessage(null);

	if (generateRunSmokeTest.getSelection() && reachedVertex == null) {
		this.setErrorMessage(MessageUtil.getString("youMustSetAReachedVertex"));
		return false;
	}

	if (this.edgesCombo.getCombo().isEnabled()) {
		String startElement = this.edgesCombo.getCombo().getText();
		if (startElement == null || startElement.trim().length() == 0) {
			this.setErrorMessage(MessageUtil.getString("youMustSetAStartElement"));
			return false;
		}
	}
	List<IFile> additionalContexts = new ArrayList<IFile>();
	TableItem[] items = fAdditionalTestViewer.getTable().getItems();
	for (int i = 0; i < items.length; i++) {
		TableItem ti = items[i];
		if (ti.getChecked())
			additionalContexts.add((IFile) ti.getData());
	}

	((ConvertToFileCreationWizard) this.getWizard()).setJunitTestPage(new JUnitTestPage(
			generateRunSmokeTest.getSelection(), generateRunStabilityTest.getSelection(),
			generateRunFunctionalTest.getSelection(), reachedVertex == null ? null : reachedVertex.getName(),
			edgesCombo == null ? null : edgesCombo.getStartElement() == null ? null
					: edgesCombo.getStartElement().getName(),
			additionalContexts));

	if (((ConvertToFileCreationWizard) this.getWizard()).testCount() == 0) {
		((ConvertToFileCreationWizard) this.getWizard()).setJunitTestPage(null);
		return false;
	}

	this.setPageComplete(true);
	return true;
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:45,代碼來源:JUnitGW4ETestUIPage.java


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