本文整理汇总了Java中org.fest.swing.annotation.RunsInEDT类的典型用法代码示例。如果您正苦于以下问题:Java RunsInEDT类的具体用法?Java RunsInEDT怎么用?Java RunsInEDT使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RunsInEDT类属于org.fest.swing.annotation包,在下文中一共展示了RunsInEDT类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: indexOfText
import org.fest.swing.annotation.RunsInEDT; //导入依赖的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);
}
});
}
示例2: createNewApp
import org.fest.swing.annotation.RunsInEDT; //导入依赖的package包/类
@RunsInEDT
private static App createNewApp() {
return execute(new GuiQuery<App>() {
protected App executeInEDT() throws Throwable {
return new App();
}
});
}
示例3: textOf
import org.fest.swing.annotation.RunsInEDT; //导入依赖的package包/类
@Override
@RunsInEDT
@Nullable
public String textOf(final @Nonnull SearchTextField component) {
return execute(new GuiQuery<String>() {
@Override
protected
@Nullable
String executeInEDT() {
return component.getText();
}
});
}
示例4: replaceText
import org.fest.swing.annotation.RunsInEDT; //导入依赖的package包/类
@RunsInEDT
public void replaceText(final VNumber vNumber, final String text)
{
if (Strings.isEmpty(text))
{
throw new IllegalArgumentException("The text to enter should not be empty");
}
selectAll(vNumber);
enterText(vNumber, text);
}
示例5: setText
import org.fest.swing.annotation.RunsInEDT; //导入依赖的package包/类
@RunsInEDT
public void setText(final VNumber vNumber, final String text)
{
focusAndWaitForFocusGain(vNumber);
VNumberDriver.setTextIn(vNumber, text);
robot.waitForIdle();
}
示例6: selectAllText
import org.fest.swing.annotation.RunsInEDT; //导入依赖的package包/类
@RunsInEDT
public static void selectAllText(final VNumber vNumber)
{
GuiActionRunner.execute(new GuiTask()
{
@Override
protected void executeInEDT()
{
vNumber.selectAll();
}
});
}
示例7: setTextIn
import org.fest.swing.annotation.RunsInEDT; //导入依赖的package包/类
@RunsInEDT
private static void setTextIn(final VNumber vNumber, final String text)
{
GuiActionRunner.execute(new GuiTask()
{
@Override
protected void executeInEDT()
{
// wrap the String in a BigDecimal
final Number textNumber = new BigDecimal(text);
vNumber.setValue(textNumber);
}
});
}
示例8: isEditable
import org.fest.swing.annotation.RunsInEDT; //导入依赖的package包/类
@RunsInEDT
private static boolean isEditable(final VNumber vNumber)
{
return GuiActionRunner.execute(new GuiQuery<Boolean>()
{
@Override
protected Boolean executeInEDT()
{
return vNumber.isEnabled();
}
});
}
示例9: textOf
import org.fest.swing.annotation.RunsInEDT; //导入依赖的package包/类
@RunsInEDT
public String textOf(final VNumber vNumber)
{
return GuiActionRunner.execute(new GuiQuery<String>()
{
@Override
protected String executeInEDT()
{
return vNumber.getValue().toString();
}
});
}
示例10: enterValue
import org.fest.swing.annotation.RunsInEDT; //导入依赖的package包/类
@Override
@RunsInEDT
public void enterValue(final JTable table, final int row, final int column, final String value)
{
final VNumber editor = doStartCellEditing(table, row, column);
// this.driver.replaceText(editor, value);
// don't use replace text, but set value directly in the VNumber
driver.setText(editor, value);
stopCellEditing(table, row, column);
}
示例11: doStartCellEditing
import org.fest.swing.annotation.RunsInEDT; //导入依赖的package包/类
@RunsInEDT
private VNumber doStartCellEditing(final JTable table, final int row, final int column)
{
final Point cellLocation = AbstractJTableCellWriter.cellLocation(table, row, column, location);
VNumber vNumber = null;
vNumber = activateEditorWithClick(table, row, column, cellLocation);
cellEditor(AbstractJTableCellWriter.cellEditor(table, row, column));
return vNumber;
}
示例12: createNewEditor
import org.fest.swing.annotation.RunsInEDT; //导入依赖的package包/类
@RunsInEDT
private static JFrame createNewEditor() {
return execute(new GuiQuery<JFrame>() {
@Override
protected JFrame executeInEDT() throws Throwable {
Beauti beauti = Beauti.main2(new String[] {});
return beauti.frame;
}
});
}
示例13: findButton
import org.fest.swing.annotation.RunsInEDT; //导入依赖的package包/类
@RunsInEDT
private JButton findButton(VFSJFileChooser<?> fileChooser, String logicalName, String text) {
JButton button = robot.finder().find(fileChooser, withText(text).andShowing());
if (button == null)
throw cannotFindButton(logicalName, text);
return button;
}
示例14: executeInEDT
import org.fest.swing.annotation.RunsInEDT; //导入依赖的package包/类
@RunsInEDT
static <FileObject> void validateAndSelectFile(final VFSJFileChooser<FileObject> fileChooser, final FileObject file) {
execute(new GuiTask() {
protected void executeInEDT() {
validateIsEnabledAndShowing(fileChooser);
validateFileToChoose(fileChooser, file);
fileChooser.setSelectedFile(file);
}
});
}
示例15: createNewBrowser
import org.fest.swing.annotation.RunsInEDT; //导入依赖的package包/类
@RunsInEDT
private static Browser createNewBrowser() {
return GuiActionRunner.execute(new GuiQuery<Browser>() {
protected Browser executeInEDT() {
return new Browser();
}
});
}