/**
* 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);
}
HTMLTable.java 文件源码
java
阅读 37
收藏 0
点赞 0
评论 0
项目:gwt-gantt
作者:
评论列表
文章目录