Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you add a row listener to a Flextable in GWT?

Tags:

css

gwt

How do you add a row listener to a specific row, or all rows in a table? I need to add a type of "onMouseOver" listener to the rows so that when you hover over them, it changes the background color of the row, much like getRowFormatter will allow you to do.

like image 525
Organiccat Avatar asked Dec 03 '22 15:12

Organiccat


1 Answers

// this is click 
final FlexTable myTable = new FlexTable();
myTable.addClickHandler(new ClickHandler() {
    public void onClick(ClickEvent event) {
        Cell cell = myTable.getCellForEvent(event);
        int receiverRowIndex = cell.getRowIndex(); // <- here!
    }
});
like image 110
Nikolay Avatar answered Dec 11 '22 15:12

Nikolay