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


Java JTableFixture.selectCell方法代码示例

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


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

示例1: selectCell

import org.fest.swing.fixture.JTableFixture; //导入方法依赖的package包/类
/**
 * Select table cell
 *
 * @param row the row number
 * @param column the column number
 * @throws VerificationException if the table element doesn't exist
 */
@PublicAtsApi
public void selectCell(
                        int row,
                        int column ) {

    new SwingElementState(this).waitToBecomeExisting();

    JTableFixture tableFixture = (JTableFixture) SwingElementLocator.findFixture(this);

    try {
        tableFixture.selectCell(new TableCell(row, column) {});
    } catch (Exception e) {
        throw new UiElementException(e.getMessage(), this);
    }
}
 
开发者ID:Axway,项目名称:ats-framework,代码行数:23,代码来源:SwingTable.java

示例2: addKeyWithSomeValue

import org.fest.swing.fixture.JTableFixture; //导入方法依赖的package包/类
@Test
public void addKeyWithSomeValue() throws Exception {
    JTableFixture editionTreeTable = frameFixture.table("editionTreeTable").cellReader(new JsonTableCellReader());


    editionTreeTable.selectCell(TableCell.row(1).column(1));
    mongoEditionPanel.addKey("stringKey", "pouet");

    editionTreeTable.selectCell(TableCell.row(1).column(1));
    mongoEditionPanel.addKey("numberKey", "1.1");

    editionTreeTable.requireContents(new String[][]{
            {"_id", "50b8d63414f85401b9268b99"},
            {"label", "toto"},
            {"visible", "false"},
            {"image", "null"},
            {"stringKey", "pouet"},
            {"numberKey", "1.1"},
    });
}
 
开发者ID:dboissier,项目名称:nosql4idea,代码行数:21,代码来源:MongoEditionPanelTest.java

示例3: setFieldValue

import org.fest.swing.fixture.JTableFixture; //导入方法依赖的package包/类
/**
 * Set table field value
 *
 * @param value the value to set
 * @param row the row number
 * @param column the column number
 * @throws VerificationException if the element doesn't exist
 */
@Override
@PublicAtsApi
public void setFieldValue(
                           String value,
                           int row,
                           int column ) {

    new SwingElementState(this).waitToBecomeExisting();

    JTableFixture tableFixture = (JTableFixture) SwingElementLocator.findFixture(this);
    try {

        TableCell tableCell = new TableCell(row, column) {};
        tableFixture.selectCell(tableCell); // if the cell coordinates are wrong, the exception will be thrown
        if (tableFixture.component().isCellEditable(row, column)) {

            tableFixture.enterValue(tableCell, value);
        } else {

            throw new NotSupportedOperationException("The table cell [" + row + "," + column
                                                     + "] is not editable. " + toString());
        }
    } catch (IndexOutOfBoundsException ioobe) {

        throw new UiElementException(ioobe.getMessage(), this);
    }
}
 
开发者ID:Axway,项目名称:ats-framework,代码行数:36,代码来源:SwingTable.java

示例4: addValueInAList

import org.fest.swing.fixture.JTableFixture; //导入方法依赖的package包/类
@Test
public void addValueInAList() throws Exception {

    mongoEditionPanel.updateEditionTree(buildDocument("simpleDocumentWithSubList.json"));
    JTableFixture editionTreeTable = frameFixture.table("editionTreeTable").cellReader(new JsonTableCellReader());

    editionTreeTable.requireContents(new String[][]{
            {"_id", "50b8d63414f85401b9268b99"},
            {"title", "XP by example"},
            {"tags", "[ \"pair programming\" , \"tdd\" , \"agile\"]"},
            {"[0]", "pair programming"},
            {"[1]", "tdd"},
            {"[2]", "agile"},
            {"innerList", "[ [ 1 , 2 , 3 , 4] , [ false , true] , [ { \"tagName\" : \"pouet\"} , { \"tagName\" : \"paf\"}]]"},
            {"[0]", "[ 1 , 2 , 3 , 4]"},
            {"[1]", "[ false , true]"},
            {"[2]", "[ { \"tagName\" : \"pouet\"} , { \"tagName\" : \"paf\"}]"}});

    editionTreeTable.selectCell(TableCell.row(3).column(1));
    mongoEditionPanel.addValue("refactor");

    editionTreeTable.requireContents(new String[][]{
            {"_id", "50b8d63414f85401b9268b99"},
            {"title", "XP by example"},
            {"tags", "[ \"pair programming\" , \"tdd\" , \"agile\"]"},
            {"[0]", "pair programming"},
            {"[1]", "tdd"},
            {"[2]", "agile"},
            {"[3]", "refactor"},
            {"innerList", "[ [ 1 , 2 , 3 , 4] , [ false , true] , [ { \"tagName\" : \"pouet\"} , { \"tagName\" : \"paf\"}]]"},
            {"[0]", "[ 1 , 2 , 3 , 4]"},
            {"[1]", "[ false , true]"},
            {"[2]", "[ { \"tagName\" : \"pouet\"} , { \"tagName\" : \"paf\"}]"}});

}
 
开发者ID:dboissier,项目名称:nosql4idea,代码行数:36,代码来源:MongoEditionPanelTest.java


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