当前位置: 首页>>代码示例>>Java>>正文


Java SWTBotTable.rowCount方法代码示例

本文整理汇总了Java中org.eclipse.swtbot.swt.finder.widgets.SWTBotTable.rowCount方法的典型用法代码示例。如果您正苦于以下问题:Java SWTBotTable.rowCount方法的具体用法?Java SWTBotTable.rowCount怎么用?Java SWTBotTable.rowCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swtbot.swt.finder.widgets.SWTBotTable的用法示例。


在下文中一共展示了SWTBotTable.rowCount方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addFourOrdersToOrdersOverview

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入方法依赖的package包/类
private void addFourOrdersToOrdersOverview() {

		SWTBotView view = wbBot.partById(BaseSWTBotTest.PART_ID_ORDER_OVERVIEW);
		view.toolbarButton("Search Order").click();

		SWTBotText text = bot.textWithLabel("&Order Number");
		text.typeText("Order");

		bot.buttonWithTooltip("Start Search").click();

		// Select Item in Table
		SWTBotTable table = bot.table();
		totalPersistedOrders = table.rowCount();
		table.click(0, 5);
		bot.sleep(100);
		table.click(1, 5);
		bot.sleep(100);
		table.click(3, 5);
		bot.sleep(100);
		table.click(5, 5);
		bot.sleep(100);

		// click Finish
		bot.button("OK").click();

	}
 
开发者ID:scenarioo,项目名称:scenarioo-example-swtbot-e4,代码行数:27,代码来源:InitOrderOverviewStatement.java

示例2: testThatAllProjectsAreDeselectedWithDeselectAll

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入方法依赖的package包/类
@Test
public void testThatAllProjectsAreDeselectedWithDeselectAll() {
    openImportProjectWizardPage();

    final SWTBotTable projectTable = bot.table(0);

    for (int i = 0; i < projectTable.rowCount(); i++) {
        projectTable.getTableItem(i).check();
    }

    bot.button("Deselect All").click();

    for (int i = 0; i < projectTable.rowCount(); i++) {
        final SWTBotTableItem oneProjectRow = projectTable.getTableItem(i);
        Assert.assertFalse(oneProjectRow.isChecked());
    }
}
 
开发者ID:codenvy-legacy,项目名称:eclipse-plugin,代码行数:18,代码来源:ProjectWizardPageTest.java

示例3: assertContext

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入方法依赖的package包/类
public void assertContext(SWTBotShell page, SummaryExecutionRow[] rows) {
	SWTBotTable table = bot.tableWithId(
			org.gw4e.eclipse.wizard.runasmanual.SummaryExecutionPage.GW4E_MANUAL_ELEMENT_ID,
			org.gw4e.eclipse.wizard.runasmanual.SummaryExecutionPage.GW4E_MANUAL_TABLE_VIEWER_SUMMARY_ID);
	int max = table.rowCount();
	for (int i = 0; i < max; i++) {
		SWTBotTableItem item = table.getTableItem(i);

		String status = getStatus(item);
		String step = item.getText(1);
		String result = item.getText(2);
		String description = item.getText(4);

		String statusExpected = rows[i].getStatus() + "";
		String stepExpected = rows[i].getStepname();
		String resultExpected = rows[i].getResult();

		String defaultResult = MessageUtil.getString("enter_a_result_if_verification_failed");
		if (defaultResult.equalsIgnoreCase(resultExpected)) {
			resultExpected = "";
		}

		String descriptionExpected = rows[i].getDescription();
		org.junit.Assert.assertEquals("Invalid status", statusExpected, status);
		org.junit.Assert.assertEquals("Invalid step", stepExpected, step);
		org.junit.Assert.assertEquals("Invalid result", resultExpected, result);
		org.junit.Assert.assertEquals("Invalid description", descriptionExpected, description);
	}

}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:31,代码来源:RunAsManualWizard.java

示例4: selectAdditionalContext

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入方法依赖的package包/类
public void selectAdditionalContext (String [] additionalsContext) {
	SWTBotTable table = bot.tableWithId(JUnitGW4ETestUIPage.GW4E_CONVERSION_WIDGET_ID,JUnitGW4ETestUIPage.GW4E_LAUNCH_TEST_CONFIGURATION_ADDITIONAL_CONTEXT);
	int count = table.rowCount();
	for (String context : additionalsContext) {
		for (int i = 0; i < count; i++) {
			SWTBotTableItem item = table.getTableItem(i);
			int cols = table.columnCount();
			for (int j = 0; j < cols; j++) {
				if (item.getText(j).equals(context)) {
					item.check();
				};
			}
		}			
	}
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:16,代码来源:JUnitGraphWalkerTestUIPageTest.java

示例5: selectGenerators

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入方法依赖的package包/类
public void selectGenerators (String [] generators) {
	SWTBotTable table = bot.tableWithId(BuildPoliciesCheckboxTableViewer.GW4E_CONVERSION_WIDGET_ID, BuildPoliciesCheckboxTableViewer.GW4E_CONVERSION_TABLE_GENERATORS);
	int max = table.rowCount();
	for (int i = 0; i < max; i++) {
		SWTBotTableItem item = table.getTableItem(i);
		for (String generator : generators) {
			if (generator.equalsIgnoreCase(item.getText())) {
				item.check();
			}
		}
	}
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:13,代码来源:OfflineTestUIPageTest.java

示例6: hasGenerator

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入方法依赖的package包/类
public boolean hasGenerator (String value) {
	SWTBotTable table = getBuildPoliciesTable();
	int max  = table.rowCount();
	for (int i = 0; i < max; i++) {
		SWTBotTableItem item = table.getTableItem(i);
		if (value.equalsIgnoreCase(item.getText())) {
			return true;
		}
	}
	return false;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:12,代码来源:GW4EProjectProperties.java

示例7: addRowValue

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入方法依赖的package包/类
void addRowValue(final String stringtoadd) {
	SWTBotTable table = getTable();
	bot.waitUntil(waitForTable());

	int currentCount = table.rowCount();
	SWTBotButton addButton = getAddButton();
	addButton.click();
	waitForRowAdded(table, currentCount + 1);
	int row = 0;
 
	editRowWithValue (table,MessageUtil.getString("enteranewvalue"), stringtoadd);
	
	leaveEditingCellClickingOnAnotherCell(table, row + 1);
	waitForExpectedValueAtRowCol(table,stringtoadd);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:16,代码来源:GW4EPreferencePage.java

示例8: removeRow

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入方法依赖的package包/类
void removeRow( String stringtoremove) {
	SWTBotTable table = getTable();
	bot.waitUntil(waitForTable());
	
	selectRowWithValue(table,stringtoremove);
	waitForExpectedValueAtRowCol(table,stringtoremove);

	int currentCount = table.rowCount();
	SWTBotButton removeButton = getRemoveButton();
	
	removeButton.click();
	waitForRowAdded(table, currentCount - 1);
	waitForNotExpectedValueAtRowCol(table,stringtoremove);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:15,代码来源:GW4EPreferencePage.java

示例9: waitForRowAdded

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入方法依赖的package包/类
private void waitForRowAdded(final SWTBotTable table, final int expectedCount) {
	ICondition condition = new DefaultCondition() {
		public boolean test() throws Exception {
			return table.rowCount() == expectedCount;
		}

		public String getFailureMessage() {
			return "Table " + id + " has not " + expectedCount + " row(s). It has " + expectedCount + " row(s)";
		}
	};
	bot.waitUntil(condition);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:13,代码来源:GW4EPreferencePage.java

示例10: setSelectionFileStatus

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入方法依赖的package包/类
public void setSelectionFileStatus (String path,boolean checked) {
	SWTBotTable table= getTable ();
	int max=table.rowCount();
	for (int i = 0; i < max; i++) {
		SWTBotTableItem tableItem = table.getTableItem(i);
		ModelData d =  (ModelData) tableItem.widget.getData();
		if (d.getName().equalsIgnoreCase(path)) {
			tableItem.widget.setChecked(checked);
		}
	}
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:12,代码来源:ModelPathGeneratorHelper.java

示例11: selectPathGenerator

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入方法依赖的package包/类
public void selectPathGenerator (String file,String path) {
	SWTBotTable table= getTable ();
	int max=table.rowCount();
	for (int i = 0; i < max; i++) {
		SWTBotTableItem tableItem = table.getTableItem(i);
		ModelData d =  (ModelData) tableItem.widget.getData();
		if (d.getName().equalsIgnoreCase(file)) {
			selectComboPathGenerator(tableItem,path);
		}
	}		
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:12,代码来源:ModelPathGeneratorHelper.java

示例12: clickOnTableCellValue

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入方法依赖的package包/类
/**
 * Click on all table cells in column {@code col} with the contents {@code value}. Selection
 * should be the last cell clicked upon.
 */
public static void clickOnTableCellValue(SWTBotTable table, int col, String value) {
  String column = table.columns().get(col);
  for (int row = 0; row < table.rowCount(); row++) {
    String cellValue = table.cell(row, column);
    if (cellValue.equals(value)) {
      table.click(row, col);
      break;
    }
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:15,代码来源:SwtBotTestingUtilities.java

示例13: tableItems

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入方法依赖的package包/类
/**
 * Returns items from a table.
 *
 * @param bot
 *          to work with, must not be {@code null}
 * @param table
 *          to look for items in, must not be {@code null}
 * @return list of table items, never {@code null}
 */
public static List<SWTBotTableItem> tableItems(final SWTWorkbenchBot bot, final SWTBotTable table) {
  Assert.isNotNull(bot, ARGUMENT_BOT);
  Assert.isNotNull(table, ARGUMENT_TABLE);
  waitForTableItem(bot, table);
  List<SWTBotTableItem> items = null;
  for (int i = 0; i < table.rowCount(); i++) {
    items = new ArrayList<SWTBotTableItem>(Arrays.asList(table.getTableItem(i)));
  }
  return items;
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:20,代码来源:CoreSwtbotTools.java

示例14: clickOnTableCellValue

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入方法依赖的package包/类
public static void clickOnTableCellValue(SWTBotTable table, int col, String value) {
  String column = table.columns().get(col);
  for (int row = 0; row < table.rowCount(); row++) {
    String cellValue = table.cell(row, column);
    if (cellValue.equals(value)) {
      table.click(row, col);
      break;
    }
  }
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:11,代码来源:SwtBotUtils.java

示例15: importCodenvyProject

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入方法依赖的package包/类
public void importCodenvyProject(String workspaceName, String projectName) {
    final SWTBotShell shell = openImportProjectWizardPage();

    final SWTBotCombo workspaceCombo = bot.comboBox(0);
    workspaceCombo.setSelection(workspaceName);

    final SWTBotTable projectTable = bot.table(0);
    bot.waitUntil(new TableHasRows(projectTable));

    for (int i = 0; i < projectTable.rowCount(); i++) {
        if (projectTable.cell(i, 0).equals(projectName)) {
            projectTable.getTableItem(i).check();
        }
    }

    bot.table(0).getTableItem(projectName).check();
    bot.button("Finish").click();

    bot.waitUntil(shellCloses(shell));
    try {

        Job.getJobManager().join(CodenvyPlugin.FAMILY_CODENVY, null);

    } catch (OperationCanceledException | InterruptedException e) {
        throw new RuntimeException(e);
    }
}
 
开发者ID:codenvy-legacy,项目名称:eclipse-plugin,代码行数:28,代码来源:SWTBotBaseTest.java


注:本文中的org.eclipse.swtbot.swt.finder.widgets.SWTBotTable.rowCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。