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


Java SWTBotCCombo.setSelection方法代码示例

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


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

示例1: addANumericScannable

import org.eclipse.swtbot.swt.finder.widgets.SWTBotCCombo; //导入方法依赖的package包/类
@Ignore("Travis does not like this one, rather a shame that")
@Test
public void addANumericScannable() throws Exception {

    SWTBotTreeItem item = bot.tree(0).getTreeItem("Experimental Conditions");
    item.select();

	bot.getDisplay().syncExec(()->viewer.addNode());

	SWTBotCCombo combo = bot.ccomboBox(0);
	assertNotNull(combo);
	combo.setSelection("a");

	assertEquals("a",   item.cell(1, 0));
	assertEquals("10.0    mm", item.cell(1, 1));

}
 
开发者ID:eclipse,项目名称:scanning,代码行数:18,代码来源:ControlTreeViewerTest.java

示例2: addAStringScannable

import org.eclipse.swtbot.swt.finder.widgets.SWTBotCCombo; //导入方法依赖的package包/类
@Ignore("Travis does not like this one, rather a shame that")
@Test
public void addAStringScannable() throws Exception {

    SWTBotTreeItem item = bot.tree(0).getTreeItem("Experimental Conditions");
    item.select();

	bot.getDisplay().syncExec(()->viewer.addNode());

	SWTBotCCombo combo = bot.ccomboBox(0);
	assertNotNull(combo);
	combo.setSelection("portshutter");

	assertEquals("portshutter",   item.cell(1, 0));
	assertEquals("Open", item.cell(1, 1));

}
 
开发者ID:eclipse,项目名称:scanning,代码行数:18,代码来源:ControlTreeViewerTest.java

示例3: selectComboPathGenerator

import org.eclipse.swtbot.swt.finder.widgets.SWTBotCCombo; //导入方法依赖的package包/类
private void selectComboPathGenerator (SWTBotTableItem tableItem,String path) {
	DefaultCondition condition = new DefaultCondition() {
		@Override
		public boolean test() throws Exception {
			try {
				tableItem.click(1);
				SWTBotCCombo combo = bot.ccomboBoxWithId(ModelPathGenerator.GW4E_LAUNCH_CONFIGURATION_PATH_GENERATOR_ID,ModelPathGenerator.GW4E_LAUNCH_CONFIGURATION_PATH_GENERATOR_COMBO_EDITOR);
				combo.setSelection(path);
				return true;
			} catch (Exception e) {
				return false;
			}
		}

		@Override
		public String getFailureMessage() {
			return "Unable to open the path generator combo";
		}
	};
	bot.waitUntil(condition);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:22,代码来源:ModelPathGeneratorHelper.java

示例4: setItem

import org.eclipse.swtbot.swt.finder.widgets.SWTBotCCombo; //导入方法依赖的package包/类
public void setItem(String value) {
	selectPart(null);
	selectTab(null, PROPERTIES);
	SWTBotCCombo combo = bot.ccomboBoxWithId( WIDGET_ID,  WIDGET_COMBO_EDGE);
	combo.setSelection(value);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:7,代码来源:GraphProperties.java

示例5: checkValuesTree4

import org.eclipse.swtbot.swt.finder.widgets.SWTBotCCombo; //导入方法依赖的package包/类
@Ignore("Cannot get the click to work...")
@Test
public void checkValuesTree4() throws Exception {

	ControlTree ct = getControlTree("control_tree4.xml");
	bot.getDisplay().syncExec(()->viewer.setControlTree(ct));

	assertEquals(2, bot.tree(0).columnCount());
	assertEquals(1, bot.tree(0).rowCount());

	assertEquals("Hutch", bot.tree(0).cell(0, 0));

    SWTBotTreeItem item = bot.tree(0).getTreeItem("Hutch");
	List<String> children = item.getNodes();
	assertEquals(Arrays.asList("Port Shutter"), children);

	assertEquals("Port Shutter",   item.cell(0, 0));
	assertEquals("Open",           item.cell(0, 1));

	SWTBotTreeItem node = item.getNode("Port Shutter");
	node.click(1); // Cannot get the click to work...

	SWTBotCCombo combo = bot.ccomboBox(0);
	combo.setSelection(1); // Closed

	bot.getDisplay().syncExec(()->viewer.applyEditorValue());

	assertEquals("Closed", item.cell(0, 1));

	node.click(1);
	combo = bot.ccomboBox(0);
	combo.setSelection(0); // Open

	bot.getDisplay().syncExec(()->viewer.applyEditorValue());

	assertEquals("Open", item.cell(0, 1));

}
 
开发者ID:eclipse,项目名称:scanning,代码行数:39,代码来源:ControlTreeViewerTest.java


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