HTMLTable.java 文件源码

java
阅读 37 收藏 0 点赞 0 评论 0

项目:gwt-gantt 作者:
/**
 * Given a click event, return the Cell that was clicked, or null if the event
 * did not hit this table.  The cell can also be null if the click event does
 * not occur on a specific cell.
 *
 * @param event A click event of indeterminate origin
 * @return The appropriate cell, or null
 */
public Cell getCellForEvent(MouseEvent<? extends EventHandler> event) {
  Element td = getEventTargetCell(Event.as(event.getNativeEvent()));
  if (td == null) {
    return null;
  }

  int row = TableRowElement.as(td.getParentElement()).getSectionRowIndex();
  int column = TableCellElement.as(td).getCellIndex();
  return new Cell(row, column);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号