本文整理汇总了Java中org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox类的典型用法代码示例。如果您正苦于以下问题:Java SWTBotCheckBox类的具体用法?Java SWTBotCheckBox怎么用?Java SWTBotCheckBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SWTBotCheckBox类属于org.eclipse.swtbot.swt.finder.widgets包,在下文中一共展示了SWTBotCheckBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validateRun
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; //导入依赖的package包/类
public void validateRun (String configurationName,String projectName,String filepath,boolean printUnvisited,boolean verbose,String startElement,String generator) {
SWTBotShell shell = openExistingRun (configurationName);
SWTBotText projectText = shell.bot().textWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_TEXT_ID_PROJECT);
assertEquals("Wrong project name",projectName,projectText.getText());
SWTBotText modelText = shell.bot().textWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_TEXT_ID_MODEL);
assertEquals("Wrong model name",filepath,modelText.getText());
SWTBotCheckBox verboseButton = shell.bot().checkBoxWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_BUTTON_ID_VERBOSE);
assertEquals("Wrong verbose value",verbose,verboseButton.isChecked());
SWTBotCheckBox unvisitedButton = shell.bot().checkBoxWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_BUTTON_ID_PRINT_UNVISITED);
assertEquals("Wrong verbose value",verbose,unvisitedButton.isChecked());
SWTBotText startElementText = shell.bot().textWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_TEXT_ID_START_ELEMENT);
assertEquals("Wrong start element",startElement,startElementText.getText());
SWTBotCombo generatorCombo = shell.bot().comboBoxWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_COMBO_PATH_GENERATOR_ID_MODEL);
assertEquals("Wrong generator value",generator,generatorCombo.getText());
SWTBotButton closeButton = bot.button("Close");
closeButton.click();
bot.waitUntil(Conditions.shellCloses(shell));
}
示例2: toggleBlocked
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; //导入依赖的package包/类
public void toggleBlocked(SWTBotGefEditPart part) {
selectPart(part);
selectTab(part, PROPERTIES);
SWTBotCheckBox checkbox = bot.checkBoxWithId(VertexDefaultSection.WIDGET_ID,VertexDefaultSection.WIDGET_BUTTON_BLOCKED);
if (checkbox.isChecked()) {
checkbox.deselect();
} else {
checkbox.select();
}
}
示例3: setFailed
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; //导入依赖的package包/类
public void setFailed(SWTBotShell page) {
SWTBotCheckBox button = page.bot().checkBoxWithId(
org.gw4e.eclipse.wizard.runasmanual.StepPage.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,
org.gw4e.eclipse.wizard.runasmanual.StepPage.GW4E_STEP_PAGE_BUTTON_FAILED_ID);
if (!button.isChecked())
button.click();
}
示例4: showConsolePreference
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; //导入依赖的package包/类
private void showConsolePreference(SWTBotShell shell) {
SWTBotTree tree = bot.tree().select("Run/Debug");
SWTBotTreeItem item = tree.getTreeItem("Console");
item.click();
SWTBotCheckBox button = bot.checkBoxWithLabel("Limit console output");
if (button.isChecked()) button.click();
}
示例5: showConsolePreference
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; //导入依赖的package包/类
private void showConsolePreference(SWTBotShell shell) {
SWTBotTree tree = bot.tree().select("Run/Debug");
tree.expandNode("Run/Debug", true);
SWTBotTreeItem[] items = tree.getAllItems();
for (SWTBotTreeItem swtBotTreeItem : items) {
if (swtBotTreeItem.getText().equalsIgnoreCase("Run/Debug")) {
swtBotTreeItem.getNode("Console").select();
}
}
try {
int max = 10;
for (int i = 0; i < max; i++) {
SWTBotCheckBox button = bot.checkBox(i);
if (button.getText().equalsIgnoreCase("&Limit console output")) {
if (button.isChecked()) {
button.click();
break;
}
}
}
} catch (Exception e) {
}
String name = "OK";
if (GW4EPlatform.isEclipse47()) name = "Apply and Close";
bot.button(name).click();
}
示例6: setOmitOption
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; //导入依赖的package包/类
private void setOmitOption (boolean value) {
SWTBotCheckBox button = bot.checkBoxWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID, GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_BUTTON_ID_OMIT_EMPTY_EDGE);
if (value && !button.isChecked()) {
button.select();
} else {
if (!value && button.isChecked()) {
button.deselect();
}
}
}
示例7: setRemoveBlockedElement
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; //导入依赖的package包/类
private void setRemoveBlockedElement (boolean value) {
SWTBotCheckBox button = bot.checkBoxWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID, GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_BUTTON_ID_REMOVE_BLOCKED_ELEMENTS);
if (value && !button.isChecked()) {
button.select();
} else {
if (!value && button.isChecked()) {
button.deselect();
}
}
}
示例8: testUncheckStopPreviousVersionButtonWhenDisabled
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; //导入依赖的package包/类
@Test
public void testUncheckStopPreviousVersionButtonWhenDisabled() {
deployPanel = createPanel(true /* requireValues */);
Button promoteButton = getButtonWithText("Promote the deployed version to receive all traffic");
Button stopButton = getButtonWithText("Stop previous version");
SWTBotCheckBox promote = new SWTBotCheckBox(promoteButton);
SWTBotCheckBox stop = new SWTBotCheckBox(stopButton);
// Initially, everything is checked and enabled.
assertTrue(promoteButton.getSelection());
assertTrue(stopButton.getSelection());
assertTrue(stopButton.getEnabled());
promote.click();
assertFalse(promoteButton.getSelection());
assertFalse(stopButton.getSelection());
assertFalse(stopButton.getEnabled());
promote.click();
assertTrue(promoteButton.getSelection());
assertTrue(stopButton.getSelection());
assertTrue(stopButton.getEnabled());
stop.click();
assertTrue(promoteButton.getSelection());
assertFalse(stopButton.getSelection());
assertTrue(stopButton.getEnabled());
promote.click();
assertFalse(promoteButton.getSelection());
assertFalse(stopButton.getSelection());
assertFalse(stopButton.getEnabled());
promote.click();
assertTrue(promoteButton.getSelection());
assertFalse(stopButton.getSelection());
assertTrue(stopButton.getEnabled());
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:40,代码来源:AppEngineDeployPreferencesPanelTest.java
示例9: testDynamicEnabling
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; //导入依赖的package包/类
@Test
public void testDynamicEnabling() {
Button asMavenProject = CompositeUtil.findControl(shell, Button.class);
new SWTBotCheckBox(asMavenProject).click();
assertTrue(getGroupIdField().getEnabled());
assertTrue(getArtifactIdField().getEnabled());
assertTrue(getVersionField().getEnabled());
new SWTBotCheckBox(asMavenProject).click();
assertFalse(getGroupIdField().getEnabled());
assertFalse(getArtifactIdField().getEnabled());
assertFalse(getVersionField().getEnabled());
}
示例10: getButton
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; //导入依赖的package包/类
private SWTBotCheckBox getButton(String libraryId) {
for (Button button : librariesSelector.getLibraryButtons()) {
if (libraryId.equals(((Library) button.getData()).getId())) {
return new SWTBotCheckBox(button);
}
}
fail("Could not find button for " + libraryId);
return null; // won't be reached
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:10,代码来源:ClientApisLibrariesSelectorGroupTest.java
示例11: setCheckBox
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; //导入依赖的package包/类
public static void setCheckBox(SWTBotCheckBox checkBox, boolean checked) {
if (checked) {
checkBox.select();
} else {
checkBox.deselect();
}
}
示例12: testThatAddToWorkingSetCheckboxIsUncheckedByDefault
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; //导入依赖的package包/类
@Test
public void testThatAddToWorkingSetCheckboxIsUncheckedByDefault() {
openImportProjectWizardPage();
final SWTBotCheckBox addToWorkingSetCheckBox = bot.checkBox(0);
Assert.assertFalse(addToWorkingSetCheckBox.isChecked());
}
示例13: testThatCheckingAddToWorkingSetSelectButtonIsEnabled
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; //导入依赖的package包/类
@Test
public void testThatCheckingAddToWorkingSetSelectButtonIsEnabled() {
openImportProjectWizardPage();
final SWTBotButton workingSetSelectButton = bot.button("Select...");
final SWTBotCheckBox addToWorkingSetCheckBox = bot.checkBox(0);
addToWorkingSetCheckBox.click();
Assert.assertTrue(workingSetSelectButton.isEnabled());
}
示例14: isShared
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; //导入依赖的package包/类
public boolean isShared(SWTBotGefEditPart part) {
selectPart(part);
selectTab(part, PROPERTIES);
SWTBotCheckBox checkbox = bot.checkBoxWithId(VertexDefaultSection.WIDGET_ID,VertexDefaultSection.WIDGET_BUTTON_SHARED);
return checkbox.isChecked();
}
示例15: toggleFilterOn
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; //导入依赖的package包/类
public void toggleFilterOn () {
SWTBotCheckBox button = botView.bot().checkBoxWithId(OutLineComposite.GW_WIDGET_ID, OutLineComposite.GW_OUTLINE_FILTER_BUTTON);
if (button.isChecked()) return;
button.click();
}