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