/** * 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(ClickEvent 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); }
|| (BrowserEvents.KEYDOWN.equals(eventType) && event.getKeyCode() == KeyCodes.KEY_ENTER); int col = targetTableCell.getCellIndex(); if (targetTableSection == thead || targetTableSection == tfoot) { boolean isHeader = (targetTableSection == thead);
int column = TableCellElement.as(td).getCellIndex();
/** * 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(ClickEvent 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); }
/** * 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(ClickEvent 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); }
|| (BrowserEvents.KEYDOWN.equals(eventType) && event.getKeyCode() == KeyCodes.KEY_ENTER); int col = targetTableCell.getCellIndex(); if (targetTableSection == thead || targetTableSection == tfoot) { boolean isHeader = (targetTableSection == thead);
|| (BrowserEvents.KEYDOWN.equals(eventType) && event.getKeyCode() == KeyCodes.KEY_ENTER); int col = targetTableCell.getCellIndex(); if (targetTableSection == thead || targetTableSection == tfoot) { boolean isHeader = (targetTableSection == thead);