• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java GuiActionRunner类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.fest.swing.edt.GuiActionRunner的典型用法代码示例。如果您正苦于以下问题:Java GuiActionRunner类的具体用法?Java GuiActionRunner怎么用?Java GuiActionRunner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



GuiActionRunner类属于org.fest.swing.edt包,在下文中一共展示了GuiActionRunner类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getCellBackgroundColors

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
/**
 * Gets table cell backgrounds (as {@link Color}) of all table cells.
 *
 * @return array of java.awt.Color objects one for each cell. First index is
 * table row and second is the column in this row.
 */
@PublicAtsApi
public Color[][] getCellBackgroundColors() {

    new SwingElementState(this).waitToBecomeExisting();

    final JTableFixture tableFixture = (JTableFixture) SwingElementLocator.findFixture(this);
    int rowCount = tableFixture.rowCount();
    // SwingUtilities.
    int columnCount = GuiActionRunner.execute(new GuiQuery<Integer>() {

        @Override
        protected Integer executeInEDT() throws Throwable {

            return tableFixture.component().getColumnCount();
        }

    });
    Color[][] resultArr = new Color[rowCount][columnCount];
    for (int i = 0; i < rowCount; i++) {
        for (int j = 0; j < columnCount; j++) {
            resultArr[i][j] = tableFixture.backgroundAt(new TableCell(i, j) {}).target();
        }
    }
    return resultArr;
}
 
开发者ID:Axway,项目名称:ats-framework,代码行数:32,代码来源:SwingTable.java


示例2: selectProjectPane

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@NotNull
public PaneFixture selectProjectPane() {
  activate();
  final ProjectView projectView = ProjectView.getInstance(myProject);
  pause(new Condition("Project view is initialized") {
    @Override
    public boolean test() {
      //noinspection ConstantConditions
      return field("isInitialized").ofType(boolean.class).in(projectView).get();
    }
  }, SHORT_TIMEOUT);

  final String id = "ProjectPane";
  GuiActionRunner.execute(new GuiTask() {
    @Override
    protected void executeInEDT() throws Throwable {
      projectView.changeView(id);
    }
  });
  return new PaneFixture(projectView.getProjectViewPaneById(id));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:ProjectViewFixture.java


示例3: indexOfText

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@RunsInEDT
private static int indexOfText(final VNumber vNumber, final String text)
{
	return GuiActionRunner.execute(new GuiQuery<Integer>()
	{
		@Override
		protected Integer executeInEDT()
		{
			ComponentStateValidator.validateIsEnabledAndShowing(vNumber);
			final String actualText = vNumber.getValue().toString();
			if (Strings.isEmpty(actualText))
			{
				return -1;
			}
			return actualText.indexOf(text);
		}
	});
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:19,代码来源:VNumberDriver.java


示例4: setUp

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Before
public void setUp() throws Exception {

    mongoEditionPanel = GuiActionRunner.execute(new GuiQuery<MongoEditionPanel>() {
        protected MongoEditionPanel executeInEDT() {
            MongoEditionPanel panel = new MongoEditionPanel() {
                @Override
                void buildPopupMenu() {
                }
            };
            return panel.init(mockMongoOperations, mockActionCallback);
        }
    });

    mongoEditionPanel.updateEditionTree(buildDocument("simpleDocument.json"));

    frameFixture = Containers.showInFrame(mongoEditionPanel);
}
 
开发者ID:dboissier,项目名称:nosql4idea,代码行数:19,代码来源:MongoEditionPanelTest.java


示例5: setUp

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    MockitoAnnotations.initMocks(MongoResultPanelTest.class);

    mongoResultPanel = GuiActionRunner.execute(new GuiQuery<MongoResultPanel>() {
        protected MongoResultPanel executeInEDT() {
            return new MongoResultPanel(DummyProject.getInstance(), mongoDocumentOperations) {
                @Override
                void buildPopupMenu() {
                }
            };
        }
    });

    frameFixture = Containers.showInFrame(mongoResultPanel);
}
 
开发者ID:dboissier,项目名称:nosql4idea,代码行数:17,代码来源:MongoResultPanelTest.java


示例6: setUp

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    when(couchbaseClientMock.loadRecords(any(ServerConfiguration.class), any(CouchbaseDatabase.class), any(CouchbaseQuery.class))).thenReturn(new CouchbaseResult("dummy"));


    couchbasePanelWrapper = GuiActionRunner.execute(new GuiQuery<CouchbasePanel>() {
        protected CouchbasePanel executeInEDT() {
            return new CouchbasePanel(DummyProject.getInstance(),
                    couchbaseClientMock,
                    new ServerConfiguration(),
                    new CouchbaseDatabase("default")) {
                @Override
                protected void addCommonsActions() {
                }
            };
        }
    });

    frameFixture = Containers.showInFrame(couchbasePanelWrapper);
}
 
开发者ID:dboissier,项目名称:nosql4idea,代码行数:21,代码来源:CouchbasePanelTest.java


示例7: setUp

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    final PanelTestingFrame frame = GuiActionRunner.execute(new GuiQuery<PanelTestingFrame>() {
        protected PanelTestingFrame executeInEDT() {
            return getPanelTestingFrame();
        }
    });
    GuiActionRunner.execute(new GuiTask() {
        protected void executeInEDT() {
            disableTooltipAndBlinkRadeForChildrenToSatisfyIdeasUsefulTestCase(frame);
        }
    });
    window = new FrameFixture(frame);
    window.show();
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:18,代码来源:BaseGuiTest.java


示例8: shouldAddNewDataSourceAfterExecutionInvoked

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Test
public void shouldAddNewDataSourceAfterExecutionInvoked() {
    panel.populateWithConfigurations(asList(notDefaultDataSource));
    clickAdd();

    GuiActionRunner.execute(new GuiTask() {
        @Override
        protected void executeInEDT() throws Throwable {
            addDataSourceActionExecutor.execute(XQueryDataSourceType.SAXON);
        }
    });

    JListFixture list = window.list().cellReader(new DataSourceListCellReader());
    list.requireSelection(1);
    assertThat(list.contents()[1], is(XQueryDataSourceType.SAXON.getPresentableName()));
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:17,代码来源:DataSourceListPanelGuiTest.java


示例9: shouldDisableSetAsDefaultButton

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Test
public void shouldDisableSetAsDefaultButton() {
    window.cleanUp();
    PanelTestingFrame frame = GuiActionRunner.execute(new GuiQuery<PanelTestingFrame>() {
        protected PanelTestingFrame executeInEDT() {
            cfg.DEFAULT = true;
            panel = new NameAndDefaultButtonPanel();
            return new PanelTestingFrame(panel.getPanel());
        }
    });
    FrameFixture anotherWindow = new FrameFixture(frame);

    anotherWindow.show();
    panel.init(cfg, aggregatingPanel, listener);

    anotherWindow.button(SET_AS_DEFAULT_BUTTON_NAME).requireDisabled();
    anotherWindow.cleanUp();
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:19,代码来源:NameAndDefaultButtonPanelGuiTest.java


示例10: selectFileUsingFileChooserDialog

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
void selectFileUsingFileChooserDialog(final File file) {
	new Thread(new Runnable() {
		@Override
		public void run() {
			delay(DIALOG_OPEN_DELAY);
			GuiActionRunner.execute(new GuiTask() {
				@Override
				protected void executeInEDT() {
					_menu._exportFileDialog.setSelectedFile(file);
					_menu._exportFileDialog.approveSelection();
				}
			});
		}
	}).start();
	clickButtonOrItem(_menu._exportFileButton);
}
 
开发者ID:FRosner,项目名称:DataGenerator,代码行数:17,代码来源:SwingMenuTestUtil.java


示例11: setUp

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Before
public void setUp() throws AWTException {
	DataGeneratorService.INSTANCE.reset();
	_frame = GuiActionRunner.execute(new GuiQuery<SwingMenu>() {
		@Override
		protected SwingMenu executeInEDT() {
			return new SwingMenu();
		}
	});
	_frameTestUtil = new SwingMenuTestUtil(_frame);
	SwingLauncher.GUI = _frame;
	_frameTestUtil.setExportFileFilter(SwingMenu.ALL_FILE_FILTER);
	if (_testFile.exists()) {
		_testFile.delete();
	}
}
 
开发者ID:FRosner,项目名称:DataGenerator,代码行数:17,代码来源:SwingMenuIntegrationTest.java


示例12: setUp

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Before
public void setUp() {
	window = new FrameFixture(
			GuiActionRunner.execute(new GuiQuery<GraphStartScreen>() {
				protected GraphStartScreen executeInEDT() {
					return new GraphStartScreen();
				}
			}));
	window.show();
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:11,代码来源:JSIMgraphGuiTest.java


示例13: setUp

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Before
public void setUp() {
	window = new FrameFixture(
			GuiActionRunner.execute(new GuiQuery<GraphStartScreen>() {
				protected GraphStartScreen executeInEDT() {
					return new GraphStartScreen();
				}
			}));
	window.show();
	window.button(new ShortDescriptionButtonMatcher(GraphStartScreen.JMVA_SHORT_DESCRIPTION)).click();
	jmva = WindowFinder.findFrame(ExactWizard.class).using(window.robot);
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:13,代码来源:JmvaGuiTest.java


示例14: setUp

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Before
public void setUp() {
	window = new FrameFixture(
			GuiActionRunner.execute(new GuiQuery<GraphStartScreen>() {
				protected GraphStartScreen executeInEDT() {
					return new GraphStartScreen();
				}
			}));
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:10,代码来源:MainGuiTest.java


示例15: createJFrame

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
public JFrame createJFrame()
{
    JFrame testFrame = GuiActionRunner.execute(new GuiQuery<JFrame>()
    {
        protected JFrame executeInEDT()
        {
            return new JFrame();
        }
    });
    return testFrame;
}
 
开发者ID:ArticulatedSocialAgentsPlatform,项目名称:HmiCore,代码行数:12,代码来源:DefaultFestDemoTester.java


示例16: expand

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@NotNull
public PaneFixture expand() {
  GuiActionRunner.execute(new GuiTask() {
    @Override
    protected void executeInEDT() throws Throwable {
      TreeUtil.expandAll(myPane.getTree());
    }
  });
  return this;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ProjectViewFixture.java


示例17: getChildren

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@NotNull
public List<NodeFixture> getChildren() {
  final List<NodeFixture> children = Lists.newArrayList();
  GuiActionRunner.execute(new GuiTask() {
    @Override
    protected void executeInEDT() throws Throwable {
      for (Object child : myTreeStructure.getChildElements(myNode)) {
        if (child instanceof ProjectViewNode) {
          children.add(new NodeFixture((ProjectViewNode<?>)child, myTreeStructure));
        }
      }
    }
  });
  return children;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:ProjectViewFixture.java


示例18: setNewName

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@NotNull
public RenameRefactoringDialogFixture setNewName(@NotNull final String newName) {
  final EditorTextField field = robot().finder().findByType(target(), EditorTextField.class);
  GuiActionRunner.execute(new GuiTask() {
    @Override
    protected void executeInEDT() throws Throwable {
      field.requestFocus();
    }
  });
  robot().pressAndReleaseKey(KeyEvent.VK_BACK_SPACE); // to make sure we don't append to existing item on Linux
  robot().enterText(newName);
  return this;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:RenameRefactoringDialogFixture.java


示例19: getHtml

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
public String getHtml() {
  final JTextComponent component = robot().finder().find(target(), JTextComponentMatcher.any());
  return GuiActionRunner.execute(new GuiQuery<String>() {
    @Override
    protected String executeInEDT() throws Throwable {
      return component.getText();
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:RenameRefactoringDialogFixture.java


示例20: requireAvdName

import org.fest.swing.edt.GuiActionRunner; //导入依赖的package包/类
@NotNull
public ConfigureAvdOptionsStepFixture requireAvdName(@NotNull String name) {
  String text = GuiActionRunner.execute(new GuiQuery<String>() {
    @Override
    protected String executeInEDT() throws Throwable {
      JTextField textFieldWithLabel = findTextFieldWithLabel("AVD Name");
      return textFieldWithLabel.getText();
    }
  });
  assertThat(text).as("AVD name").isEqualTo(name);
  return this;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:ConfigureAvdOptionsStepFixture.java



注:本文中的org.fest.swing.edt.GuiActionRunner类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HighlighterLayer类代码示例发布时间:2022-05-22
下一篇:
Java AccessAccept类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap