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


Java TableCell类代码示例

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


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

示例1: getFieldValue

import org.fest.swing.data.TableCell; //导入依赖的package包/类
/**
 * Get table field value
 *
 * @param row the row number
 * @param column the column number
 * @throws VerificationException if the element doesn't exist
 */
@Override
@PublicAtsApi
public String getFieldValue(
                             int row,
                             int column ) {

    new SwingElementState(this).waitToBecomeExisting();

    try {
        return ((JTableFixture) SwingElementLocator.findFixture(this)).valueAt(new TableCell(row,
                                                                                             column) {});
    } catch (IndexOutOfBoundsException ioobe) {

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

示例2: clickCell

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

    new SwingElementState(this).waitToBecomeExisting();

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

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

示例3: doubleClickCell

import org.fest.swing.data.TableCell; //导入依赖的package包/类
/**
 * Double click table cell
 *
 * @param row the row number
 * @param column the column number
 * @throws VerificationException if the element doesn't exist
 */
@PublicAtsApi
public void doubleClickCell(
                             int row,
                             int column ) {

    new SwingElementState(this).waitToBecomeExisting();

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

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

示例4: rightClickCell

import org.fest.swing.data.TableCell; //导入依赖的package包/类
/**
 * Right click on table cell
 *
 * @param row the row number
 * @param column the column number
 * @throws VerificationException if the table element doesn't exist
 */
@PublicAtsApi
public void rightClickCell(
                            int row,
                            int column ) {

    new SwingElementState(this).waitToBecomeExisting();

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

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

示例5: selectCell

import org.fest.swing.data.TableCell; //导入依赖的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

示例6: selectCells

import org.fest.swing.data.TableCell; //导入依赖的package包/类
/**
 * Select table cells
 *
 * @param cells the cells coordinates (eg. new int[][]{ { 1, 1 }, { 1, 2 }, { 2, 2 } )
 * @throws VerificationException if the element doesn't exist
 */
@PublicAtsApi
public void selectCells(
                         int[][] cells ) {

    new SwingElementState(this).waitToBecomeExisting();

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

        TableCell[] cellsToSelect = new TableCell[cells.length];
        for (int i = 0; i < cells.length; i++) {
            int row = cells[i][0];
            int column = cells[i][1];
            cellsToSelect[i] = new TableCell(row, column) {};
        }
        tableFixture.selectCells(cellsToSelect);
    } catch (Exception e) {

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

示例7: getCellBackgroundColors

import org.fest.swing.data.TableCell; //导入依赖的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

示例8: editAvdWithName

import org.fest.swing.data.TableCell; //导入依赖的package包/类
public AvdEditWizardFixture editAvdWithName(@NotNull String name) {
  final TableView tableView = robot().finder().findByType(target(), TableView.class, true);
  JTableFixture tableFixture = new JTableFixture(robot(), tableView);
  JTableCellFixture cell = tableFixture.cell(name);
  final TableCell actionCell = TableCell.row(cell.row()).column(7);

  JTableCellFixture actionCellFixture = tableFixture.cell(actionCell);

  execute(new GuiTask() {
    @Override
    protected void executeInEDT() throws Throwable {
      tableView.editCellAt(actionCell.row, actionCell.column);
    }
  });

  JPanel actionPanel = (JPanel)actionCellFixture.editor();
  HyperlinkLabel editButtonLabel = robot().finder().find(actionPanel, new GenericTypeMatcher<HyperlinkLabel>(HyperlinkLabel.class) {
    @Override
    protected boolean isMatching(@NotNull HyperlinkLabel component) {
      return "Edit this AVD".equals(component.getToolTipText());
    }
  });
  robot().click(editButtonLabel);
  return AvdEditWizardFixture.find(robot());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:AvdManagerDialogFixture.java

示例9: findTableCell

import org.fest.swing.data.TableCell; //导入依赖的package包/类
@Nullable
private TableCell findTableCell(boolean requireExists) {
  RadPropertyTable table = getTable();
  TableModel model = table.getModel();
  int rowCount = model.getRowCount();
  int columnCount = model.getColumnCount();
  for (int row = 0; row < rowCount; row++) {
    for (int column = 0; column < columnCount; column++) {
      Object valueAt = model.getValueAt(row, column);
      if (valueAt == myProperty) {
        return TableCell.row(row).column(1);
      }
    }
  }

  if (requireExists) {
    fail("Could not find property " + myProperty + " in the property table!");
  }

  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:PropertyFixture.java

示例10: findAttributeCell

import org.fest.swing.data.TableCell; //导入依赖的package包/类
public static TableCell findAttributeCell(final JXTable table, final HUAttributeSetModel model, final String identifier)
{
	int resultViewRowIndex = -1;
	for (int viewRowIndex = 0; viewRowIndex < table.getRowCount(); viewRowIndex++)
	{
		final int modelRowIndex = table.convertRowIndexToModel(viewRowIndex);

		final I_M_Attribute attribute = model.getM_Attribute(modelRowIndex);
		if (attribute.getName().equals(identifier))
		{
			resultViewRowIndex = viewRowIndex;
			break;
		}
	}

	return TableCell.row(resultViewRowIndex).column(HUAttributeSetModel.COLUMN_PropertyValue);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:18,代码来源:TableCellHelper.java

示例11: shouldFindByDescription

import org.fest.swing.data.TableCell; //导入依赖的package包/类
@Test
public void shouldFindByDescription() throws InterruptedException {
	editorFixture.menuItemWithPath("Tools", "Find").click();
	editorFixture.dialog().textBox().setText("desc");

	editorFixture.dialog().button(JButtonMatcher.withText("Search")).click();

	editorFixture.dialog().table().requireCellValue(TableCell.row(0).column(3), "some description");

	editorFixture.dialog().table().selectRows(0).doubleClick();

	assertThat(editorFixture.comboBox().contents()).hasSize(4);

	ActiveSession activeSession = injector.getInstance(ActiveSession.class);
	assertThat(activeSession.isSessionLoaded()).isTrue();
	assertThat(activeSession.getSession()).isNotNull();
	assertThat(activeSession.getSession().getName()).isEqualTo("one");
}
 
开发者ID:mnikliborc,项目名称:clicktrace,代码行数:19,代码来源:SearchDialogTest.java

示例12: linkTreesAndDeleteTest2b

import org.fest.swing.data.TableCell; //导入依赖的package包/类
@Test
public void linkTreesAndDeleteTest2b() throws Exception {
	warning("Load gopher data 26.nex, 47.nex");
	importAlignment("examples/nexus", new File("26.nex"), new File("47.nex"));

	JTabbedPaneFixture f = beautiFrame.tabbedPane();
	printBeautiState(f);

	selectRows(1, 0);

	warning("Link trees");
	f.selectTab("Partitions");
	beautiFrame.button("Link Trees").click();
	printBeautiState(f);
	assertPriorsEqual("YuleModel.t:26", "YuleBirthRatePrior.t:26", "ClockPrior.c:47");

	warning("Delete first partition");
	f.selectTab("Partitions");
	beautiFrame.table().selectCell(TableCell.row(0).column(1));
	beautiFrame.button("-").click();
	printBeautiState(f);
	assertPriorsEqual("YuleModel.t:26", "YuleBirthRatePrior.t:26");
	
	makeSureXMLParses();
}
 
开发者ID:CompEvol,项目名称:beast2,代码行数:26,代码来源:LinkUnlinkTest.java

示例13: editKeyWithStringValue

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

//        edit 'label' key
        editionTreeTable.enterValue(TableCell.row(1).column(1), "Hello");

        frameFixture.button("saveButton").click();

        ArgumentCaptor<DBObject> argument = ArgumentCaptor.forClass(DBObject.class);
        verify(mockMongoOperations).updateMongoDocument(argument.capture());

        Assert.assertEquals("{ \"_id\" : { \"$oid\" : \"50b8d63414f85401b9268b99\"} , \"label\" : \"Hello\" , \"visible\" : false , \"image\" :  null }",
                argument.getValue().toString());

        verify(mockActionCallback, times(1)).onOperationSuccess(any(String.class));
    }
 
开发者ID:dboissier,项目名称:nosql4idea,代码行数:18,代码来源:MongoEditionPanelTest.java

示例14: addKeyWithSomeValue

import org.fest.swing.data.TableCell; //导入依赖的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

示例15: linkTreesAndDeleteTest2a

import org.fest.swing.data.TableCell; //导入依赖的package包/类
@Test
public void linkTreesAndDeleteTest2a() throws Exception {
	warning("Load gopher data 26.nex, 47.nex");
	importAlignment("examples/nexus", new File("26.nex"), new File("47.nex"));

	JTabbedPaneFixture f = beautiFrame.tabbedPane();
	printBeautiState(f);

	JTableFixture t = beautiFrame.table();
	t.selectCells(TableCell.row(0).column(0), TableCell.row(1).column(0));

	warning("Link trees");
	f.selectTab("Partitions");
	beautiFrame.button("Link Trees").click();
	printBeautiState(f);

	warning("Delete second partition");
	f.selectTab("Partitions");
	beautiFrame.table().selectCell(TableCell.row(1).column(0));
	beautiFrame.button("-").click();
	printBeautiState(f);
	assertPriorsEqual("YuleModel.t:26", "YuleBirthRatePrior.t:26");
	
	makeSureXMLParses();
}
 
开发者ID:rbouckaert,项目名称:YABBY,代码行数:26,代码来源:LinkUnlinkTest.java


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