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


Java GuiActionRunner类代码示例

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


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


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